WordPress – How to disable password changed emails

The following code can be used to disable the WordPress “Password Changed” notification emails.

These are the emails the site administrator receives when a user changes their password or first registered and specifies a password.

If you’re not sure where to place this code I highly recommend you read How to create a WordPress plugin for your custom functions.

if ( ! function_exists( 'wp_password_change_notification' ) ) :
    function wp_password_change_notification( $user ) {
        return;
    }
endif;

How does it work?

The wp_password_change_notification function is the part of the WordPress core that handles the email notification.

It’s also a pluggable function – meaning we can call it through a theme or a plugin and completely override it.

The code above does this and returns nothing, meaning no email is created or sent when it is triggered.

You may also be interested in ….