Skip to content

Instantly share code, notes, and snippets.

@cartpauj
Created July 19, 2019 14:05
Show Gist options
  • Save cartpauj/1fe73e63c0ab2f71d3e50d72e405c0eb to your computer and use it in GitHub Desktop.
Save cartpauj/1fe73e63c0ab2f71d3e50d72e405c0eb to your computer and use it in GitHub Desktop.
Disable Password Lost/Changed email to admins in MemberPress
<?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