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
my action acf/save_post runs with priority of 5 now
i want to check if the user changed his address field with
if ( $_POST['acf']['field_5fd213f4c6e02'] != get_field('field_5fd213f4c6e02') ) {
$street = $_POST['acf']['field_5fd213f4c6e02'];
}
then i send my email:
if ( !empty( $street ) {
....
}
but now it sends me an email every time i update. not only if field field_5fd213f4c6e02 is updated.
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.