我们的客户希望在有人使用“忘记密码”表单时禁用发送Wordpress的默认通知电子邮件 .
客户端使用的主题也会发送带有新密码的电子邮件,因此应禁用默认通知 .
但我不知道该怎么做,有人可以帮我这个吗?
问候
将此行添加到您的函数文件中以禁用wordpress中的默认密码更改通知 .
要禁用wp_update_user()函数发送的已更改电子邮件的通知,只需使用过滤器钩子返回false:
add_filter( 'send_email_change_email', '__return_false' );
参考 - https://codex.wordpress.org/Plugin_API/Filter_Reference/send_email_change_email
Method 2
if ( !function_exists( 'wp_password_change_notification' ) ) { function wp_password_change_notification() {} }
将此代码放在方法2的插件文件中 . 注意 - 如果放入主题函数文件,它将无效
参考 - http://www.wpbeginner.com/wp-tutorials/how-to-disable-lostchanged-password-emails-in-wordpress/
Method 3 - use this plugin to get required output
https://wordpress.org/plugins/manage-notification-emails/
1 回答
将此行添加到您的函数文件中以禁用wordpress中的默认密码更改通知 .
要禁用wp_update_user()函数发送的已更改电子邮件的通知,只需使用过滤器钩子返回false:
参考 - https://codex.wordpress.org/Plugin_API/Filter_Reference/send_email_change_email
Method 2
将此代码放在方法2的插件文件中 . 注意 - 如果放入主题函数文件,它将无效
参考 - http://www.wpbeginner.com/wp-tutorials/how-to-disable-lostchanged-password-emails-in-wordpress/
Method 3 - use this plugin to get required output
https://wordpress.org/plugins/manage-notification-emails/