Created
September 7, 2012 16:24
-
-
Save strangerstudios/3667545 to your computer and use it in GitHub Desktop.
Disable All PMPro Emails
This file contains 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
<?php | |
/* | |
Plugin Name: PMPro Disable All Emails | |
Plugin URI: http://www.paidmembershipspro.com/wp/pmpro-disable-all-emails/ | |
Description: Disable All PMPro Emails | |
Version: .1 | |
Author: Stranger Studios | |
Author URI: http://www.strangerstudios.com | |
Add this file to your /wp-content/plugins/ folder and then activate it from the Plugins page in your WP admin. | |
*/ | |
/* | |
Disable all PMPro Emails | |
*/ | |
function dae_pmpro_email_recipient($recipient, $email) | |
{ | |
//if($email->template == "invoice") //use this to check for a certain template | |
$recipient = NULL; | |
return $recipient; | |
} | |
add_filter("pmpro_email_recipient", "dae_pmpro_email_recipient", 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello there ! Thank you for this great snippet. I have 2 questions "