I need your advice / help on something that is driving me crazy. I always use ultimate members and want the admin to receive an email when a user has encountered their profile. The problem is that I receive the email twice ...
I added in the function.php file:
Sending an email after updating the user profile
add_action( 'um_user_after_updating_profile', 'profile_update_name', 1, 10 );
function profile_update_name() {
$first_name = um_profile('first_name');
$last_name = um_profile('last_name');
$admin_email = "mymail@gmail.com";
$message .= sprintf( __( $first_name .' '. $last_name . 'a mis à jour sa fiche de individuelle.')). "\r\n\r\n";
wp_mail( $admin_email, sprintf( __( '[Modification fiche individuelle]' ) ),$message );
};