Support

Account

Home Forums ACF PRO Check if field has changed when save to change mail Reply To: Check if field has changed when save to change mail

  • To do this you need to set your filter to run on the hook acf/save_post with a priority <10.
    https://www.advancedcustomfields.com/resources/acf-save_post/

    At this point any old values for the custom fields are still in the database and you can compare the values that are submitted with the old values:

    
    $old_value = get_field('your_field_name', $post_id);
    $new_value = $_POST['acf']['your_field_key'];
    

    You’ll also need to adjust your other function to use the post ID passed to your filter by ACF