If the “Disable Password Fields on membership registration forms” option is active in MemberPress settings (Dashboard > MemberPress > Settings > Account tab), MemberPress will trigger the default WordPress email containing a password reset link. This code snippet will prevent that email from being triggered.
function mepr_disable_password_reset_email( $recipients, $subject, $message, $headers ) {
$set_password_notification_subject = MeprHooks::apply_filters( 'mepr_set_new_password_title', sprintf( __( "[%s] Set Your New Password", 'memberpress' ), MeprUtils::blogname() ) );
if ( $subject == $set_password_notification_subject ) {
$recipients = array();
}
return $recipients;
}
add_filter( 'mepr_wp_mail_recipients', 'mepr_disable_password_reset_email', 10, 4 );