wordpress - Wordpress - 在密码更改时禁用用户通知
问题描述
我们的客户希望禁用在有人使用“忘记密码”表单时发送 Wordpress 的默认通知电子邮件。
客户端使用的主题也会发送一封包含新密码的电子邮件,因此应禁用默认通知。
但是我不知道该怎么做,有人可以帮我吗?
问候
解决方案
Add this line to your function file to disable default password change notification in wordpress.
To disable the notice of changed email sent by the wp_update_user() function, simply use the filter hook to return false:
add_filter( 'send_email_change_email', '__return_false' );
Reference - 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() {}
}
put this code in your plugin file for method 2. Note - it will not work if you put in your theme function file
Reference - http://www.wpbeginner.com/wp-tutorials/how-to-disable-lostchanged-password-emails-in-wordpress/
Method 3 - use this plugin to get required output
推荐阅读
- javascript - Loggly 的 Winston 传输无法始终如一地工作
- matlab - MATLAB 编译器调试
- java - Groovy Array.pop() 返回无方法签名:java.lang.String.pop()
- php - 数组推送到在php中给出空值的键
- jquery - 如何在javascript中保存附加值?
- python - 递归生成索引列表 - Python
- html - 试图让两个 div 并排坐着,但代码有问题
- visual-studio - Visual Studio .csproj 文件有一个“TargetFramework”变量
- python - Pandas 在合并时强制在 To Dataframes 中添加后缀
- python - 可以通过python成功运行source命令吗?