admin管理员组

文章数量:1333636

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?

Share Improve this question edited Jun 11, 2020 at 5:13 fuxia 107k38 gold badges255 silver badges459 bronze badges asked Jun 11, 2020 at 2:09 RaffyMRaffyM 1231 silver badge4 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Yes, 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 );

本文标签: woocommerce offtopicChange password notification email