Skip to content

Instantly share code, notes, and snippets.

@alordiel
Created August 22, 2018 14:25
Show Gist options
  • Save alordiel/0941f1d26ac44a4945fe8bd344c3e7b9 to your computer and use it in GitHub Desktop.
Save alordiel/0941f1d26ac44a4945fe8bd344c3e7b9 to your computer and use it in GitHub Desktop.
WordPress: remove the password change notification email
<?pgp
add_action( 'wp_head', 'remove_notificationpassword_emails',100 );
function remove_notificationpassword_emails() {
remove_action( 'after_password_reset', 'wp_password_change_notification', 11 );
add_filter( 'send_password_change_email', '__return_false' );
}
add_filter( 'send_password_change_email', '__return_false' );
if ( ! function_exists( 'wp_password_change_notification' ) ) {
function wp_password_change_notification( $user ) {
return;
}
}
// some of the above are redundant but not sure which one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment