您可以使用profile_update hook 在保存后执行操作
function wpse_264096_send_email( $user_id, $old_user_data ) {
// Get the user object for $user_id
$user = get_user_by( \'ID\', $user_id );
$user_email = $user->data->email;
/** You can get any meta fields by this, just change \'meta_key\' to the key desired
* True means its a single value, it will output as a string.
* If you set to false you get an array with the meta_value, handy if there are multiple values.
*/
$user_meta = get_user_meta( $user_id, \'meta_key\', true );
// Send e-mail to the user
$message = "Your information has changed. Your new <META KEY> is now <$user_meta>";
wp_mail( $user_email, \'Your information has been updated\', $message );
// Send e-mail to the site admin
$message = "A users information has changed. The new <META KEY> is now <$user_meta>";
wp_mail( get_option( \'admin_email\' ), \'Your information has been updated\', $message );
}
add_action( \'profile_update\', \'wpse_264096_send_email\', 10, 2 );