Home › Forums › General Issues › Update_field not working on post update › Reply To: Update_field not working on post update
I switched to the ‘acf/save_post’ hook instead of ‘transition_post_status’, per a support ticket, and it’s saving now 🙂
I got the post id by echoing out get_the_ID() (see code comments); I just hardcoded it to be sure. This was just a basic text field. To test, I was just saving the post and checking to see that the field had been updated from the edit-post view.
Note: For this to work, I set the priority to 20; leaving it as 1 (before post save) didn’t work.
Thanks for the help.
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.