Created
July 19, 2019 14:05
-
-
Save cartpauj/1fe73e63c0ab2f71d3e50d72e405c0eb to your computer and use it in GitHub Desktop.
Disable Password Lost/Changed email to admins in MemberPress
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
<?php | |
// This disables the admin email notice of password resets in MemberPress. | |
// In some cases WordPress still sends its own out, there may be other plugins | |
// that will disable the WP one. | |
function disable_lost_and_changed_mepr($recipients, $subject, $message, $headers) { | |
if(strpos(strtolower($subject), 'password lost') !== false) { | |
$recipients = array(); | |
} | |
return $recipients; | |
} | |
add_filter('mepr-wp-mail-recipients', 'disable_lost_and_changed_mepr', 11, 4); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment