Skip to content

Instantly share code, notes, and snippets.

@femiyb
Last active December 16, 2022 21:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save femiyb/b5352e600b8526e12036d7c8e802ff16 to your computer and use it in GitHub Desktop.
Save femiyb/b5352e600b8526e12036d7c8e802ff16 to your computer and use it in GitHub Desktop.
<?php
/*
Add bcc for checkout emails
*/
function my_pmpro_email_headers_admin_emails($headers, $email)
{
//bcc checkout emails
if($email->template == "membership_expiring" || $email->template == "membership_expired")
{
//add bcc
$headers[] = "Bcc:" . "otheremail@domain.com";
}
return $headers;
}
add_filter("pmpro_email_headers", "my_pmpro_email_headers_admin_emails", 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment