最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

woocommerce offtopic - Change password notification email

programmeradmin0浏览0评论

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 );
发布评论

评论列表(0)

  1. 暂无评论