Home › Forums › Backend Issues (wp-admin) › acf/save_post – execute only when value of field has changed › Reply To: acf/save_post – execute only when value of field has changed
You need to run your action with a priority of <10 so that it runs before the new values are saved.
$_POST['acf']['field_5fd213a8c6dfe']
will have the new value and get_field('field_5fd213a8c6dfe')
will return the old value.
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.