Help on a hook for sending user email when admin update profile
-
I found this hook but it need a very small change to match my needs.
When someone update a profile (user or admin) an email is send to admin BUT i need an email is send to user (not admin).
Can anybody help on this?add_action( 'um_after_user_updated', 'my_after_user_updated', 10, 3 ); function my_after_user_updated( $user_id, $args, $userinfo ) { um_fetch_user($user_id); $groupMember = um_user('display_name'); $groupMmbr_name = um_user('user_login'); $loggedIn_user = wp_get_current_user(); $loggedIn_userEml = $loggedIn_user->user_email; $headers = array('Content-Type: text/html; charset=UTF-8', 'Cc:hbaum@salisburypreschool.org', 'Bcc:webdev@somewebdevdomain.com', 'From:Some Profile Update <do_not_reply@somegroupsitedomain.com>', 'Reply-To:No-reply Email<do_not_reply@somegroupsitedomain.com>'); wp_mail( 'groupManager@somegroupsitedomain.com', 'The '.$groupMember.'profile was updated.', 'The <b>'.$groupMember.'</b>profile was updated by the user with this email address: '.$loggedIn_userEml.'. <a href="https://somegroupsitedomain.com/user/'.$groupMmbr_name.'/?profiletab=main&um_action=edit"><b>Click here</b></a> to visit this profile online.<br><br><i style="color:#767676; font-size:11px; text-align:center;"><b>NOTE:</b> you must be logged in first to see this profile.</i>',$headers); }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Help on a hook for sending user email when admin update profile’ is closed to new replies.