• I have the following in my functions.php file, it was working… it’s possible that plugin updates broke it. Disabled non-critical plugins, running WP 4.9.6, and UM 2.0.17
    This no longer triggers the email to be sent.

    // Run on successful submit profile form
    add_action(‘um_user_edit_profile’, ‘um_post_edit_pending_hook’, 10, 2);
    function um_post_edit_pending_hook($user_id, $args) {

    get_currentuserinfo();

    if ( is_user_logged_in() ) {

    $to = ‘[email protected]’;
    $subject = ‘User has updated their profile’;
    $message = ‘You will receive this email when a user edits their profile.’;

    wp_mail( $to, $subject, $message );

    }

    }

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Ultimate Member Support

    (@ultimatemembersupport)

    Hi @wwwcre8r,

    Please use this code:

    // Run on successful submit profile form
    add_action(‘um_user_edit_profile’, ‘um_post_edit_pending_hook’, 10, 1);
    function um_post_edit_pending_hook($args) {
    $user_id = $args['user_id'];
    get_currentuserinfo();
    
    if ( is_user_logged_in() ) {
    
    $to = ‘[email protected]’;
    $subject = ‘User has updated their profile’;
    $message = ‘You will receive this email when a user edits their profile.’;
    
    wp_mail( $to, $subject, $message );
    
    }
    
    }

    Regards.

    Thread Starter wwwcre8r

    (@wwwcre8r)

    I cannot get this to work (I added it to the end of my theme’s functions.php file), is someone able to test this on a site? I setup two other brand-new environments (on separate hosts), with no luck.

    I can submit forms and I receive those emails, so mail is leaving the server.

    But users who edit their profiles and submit (/?profiletab=main&um_action=edit), the data saves… but no email is triggered.

    Any other thoughts on how to troubleshoot this and get it to work?

    Regards, Will

    Thread Starter wwwcre8r

    (@wwwcre8r)

    Can someone *please* confirm that this code (above from ultimatemembersupport) actually works with WP 4.9.6, and UM 2.0.17 ?

    Please, I am begging!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Notify admin upon profile update?’ is closed to new replies.