Home › Forums › General Issues › ACF field true/false › Reply To: ACF field true/false
The problem is that ‘publish_post’ happens before save_post
and ACF saves values on the latter. This means that you are attempting to get a value that ACF has not yet set.
You either need to use the acf/save_post hook with a priority > 10 or you need to look for the value in $_POST[‘acf’]
https://www.advancedcustomfields.com/resources/acf-save_post/
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.