Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save strangerstudios/4206776 to your computer and use it in GitHub Desktop.
Save strangerstudios/4206776 to your computer and use it in GitHub Desktop.
BCC all Paid Memberships Pro Emails to a Certain Address
/*
Bcc admin on PMPro member only emails
You can change the conditional to check for a certain $email->template or some other condition before adding the BCC.
*/
function my_pmpro_email_headers($headers, $email)
{
//bcc emails not already going to admin_email
if($email->email != get_bloginfo("admin_email"))
{
//add bcc
$headers[] = "Bcc:" . get_bloginfo("admin_email");
}
return $headers;
}
add_filter("pmpro_email_headers", "my_pmpro_email_headers", 10, 2);
@laurenhagan0306
Copy link

This recipe is included in the blog post on "BCC Additional Email Addresses on Member or Admin Notifications" at Paid Memberships Pro here: https://www.paidmembershipspro.com/bcc-additional-email-addresses-on-member-or-admin-notifications/

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