Home › Forums › General Issues › Update_field not working on post update › Reply To: Update_field not working on post update
I have the same issue – ACF functions do not seem to work in update_post, regardless of priority.
The solution for me, because I needed to use post_updated to compare old and new post titles and slugs, was to update the value in $_POST[‘acf’]. E.g:
$_POST['acf']['field_5f19d4ad03a30'][] = ['field_5f19d4b503a31' => $old_title]
In this case, I am saving the old title to a repeater. For this to work you must use field keys, not field names.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.