Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
BCC an additional email on PMPro admin emails. Works with PMPro Approvals emails.
/*
Add bcc for PMPro admin emails
*/
function my_pmpro_email_headers_admin_emails($headers, $email)
{
$approval_admin = array( "admin_approved", "admin_denied", "admin_notification" );
//bcc emails already going to admin_email
if( strpos($email->template, "_admin") !== false || in_array($email->template, $approval_admin) )
{
//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
You can’t perform that action at this time.