Created
July 22, 2014 03:54
-
-
Save strangerstudios/c5da52184d440305072a to your computer and use it in GitHub Desktop.
BCC a second email address on PMPro admin 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
/* | |
Add bcc for PMPro admin emails. | |
Change email@domain.com below to the address you want to use. | |
Add this code to your active theme's functions.php or a custom plugin | |
a la http://www.paidmembershipspro.com/2012/08/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_pmpro_email_headers_bcc($headers, $email) | |
{ | |
//bcc emails going to admins | |
if(strpos($email->template, "admin") !== false) | |
{ | |
//add bcc | |
$headers[] = "Bcc:email@domain.com"; | |
} | |
return $headers; | |
} | |
add_filter("pmpro_email_headers", "my_pmpro_email_headers_bcc", 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice addition