Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created July 22, 2014 03:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save strangerstudios/c5da52184d440305072a to your computer and use it in GitHub Desktop.
Save strangerstudios/c5da52184d440305072a to your computer and use it in GitHub Desktop.
BCC a second email address on PMPro admin emails.
/*
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);
@solhuebner
Copy link

Nice addition

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