Last active
April 27, 2020 14:11
-
-
Save strangerstudios/a36ee82803abfed2cbe5 to your computer and use it in GitHub Desktop.
Disable any email sent to the Member/User by Paid Memberships Pro
This file contains hidden or 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
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
str_pos
is not a valid function here. The correct recipe is now located here: https://gist.github.com/kimcoleman/df027dfc84e0d0bcd1b12621fa744a3b