By default, when customer changed their password using "Lost your password?" link, an email notification saying "Password changed for user: ***
" will be sent to Admin's email address. Is there way to change the email address recipient without changing the website's admin email address?
By default, when customer changed their password using "Lost your password?" link, an email notification saying "Password changed for user: ***
" will be sent to Admin's email address. Is there way to change the email address recipient without changing the website's admin email address?
1 Answer
Reset to default 0Yes, the email properties are filtered through wp_password_change_notification_email before it is sent (code here), which you can hook to modify them e.g.
function set_password_change_notification_email_to( $email, $user, $blogname ) {
$email[ 'to' ] = '[email protected]';
return $email;
}
add_filter( 'wp_password_change_notification_email',
'set_password_change_notification_email_to', 10, 3 );