Support

Account

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.