Home Forums General Issues Email User within a user field Reply To: Email User within a user field

  • General outline
    1) Create an acf/save_post action that fires before ACF has saved values (priority < 10)

    2) New field value will be in $_POST['acf'][$field_key]. Get old value of field using get_field(). The new value for a user field will be an array of user IDs.

    3) Compare the old value with the new value to see what users have been added to the array.

    4) Use wp_mail() to send an email to the added users.