Created
August 22, 2018 14:25
-
-
Save alordiel/0941f1d26ac44a4945fe8bd344c3e7b9 to your computer and use it in GitHub Desktop.
WordPress: remove the password change notification email
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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