Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Last active April 27, 2020 14:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save strangerstudios/a36ee82803abfed2cbe5 to your computer and use it in GitHub Desktop.
Save strangerstudios/a36ee82803abfed2cbe5 to your computer and use it in GitHub Desktop.
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
Copy link

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