Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress - Disable user notification on password change

Our client wants to disable the default notification email that sends Wordpress when someone uses the "forgot password" form.

The client uses a theme that also sends out an email with the new password so the default notification should be disabled.

But I don't know how to do this, can anyone help me with this?

Regards

like image 742
n00bly Avatar asked Jun 27 '18 06:06

n00bly


1 Answers

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

https://wordpress.org/plugins/manage-notification-emails/

like image 107
Jitendra Popat Avatar answered Sep 24 '22 18:09

Jitendra Popat