Disable User Password Change Email/Notification on WordPress


Wondering, How to disable user password change emails/notifications. Here is your answer.

Disable Password Change Email to Admin

Note: Create a Plugin or Add this code inside a custom plugin to make this code work.

/**
 * Disable Admin Notification of User Password Change
 *
 * @see pluggable.php
 */
if ( ! function_exists( 'wp_password_change_notification' ) ) {
    function wp_password_change_notification( $user ) {
        return;
    }
}

Suppressing this email notification has to handled with a plugin because pluggable.php is loaded earlier than a theme’s functions.php file.

Disable Password Change Email to Users

/**
 * Disable User Notification of User Password Change
 */
add_filter( 'send_password_change_email', '__return_false' );

Add above line of code in functions.php of your theme to disable user password change emails to users itself.

,

Leave a Reply

Your email address will not be published. Required fields are marked *