Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Disable any email sent to the Member/User by Paid Memberships Pro
function my_pmpro_disable_member_emails($recipient, $email)
{
if(str_pos($email->template, "_admin") == false) //this is not an admin email template
$recipient = NULL;
return $recipient;
}
add_filter("pmpro_email_recipient", "my_pmpro_disable_member_emails", 10, 2);
@kimcoleman

This comment has been minimized.

Copy link

@kimcoleman kimcoleman commented Apr 27, 2020

str_pos is not a valid function here. The correct recipe is now located here: https://gist.github.com/kimcoleman/df027dfc84e0d0bcd1b12621fa744a3b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment