Send automatic emails to multiple user roles when a custom field is updated in a custom post type
This code will allow you to call a custom function when your meta key is updated. add_action(‘updated_postmeta’,’my_meta_update’, 10, 4); function my_meta_update( $meta_id, $object_id, $meta_key, $meta_value ) { if($meta_key === ‘my_meta_key’) { // trigger email(s) // wp_mail( $to, $subject, $message, $headers, $attachments ); } } Like Shaun mentioned, you should always use an external email solution … Read more