Forked from femiyb/my_pmpro_email_headers_admin_emails.php
Last active
December 12, 2019 08:11
-
-
Save MaryOJob/27bec352fa3d7cc3dc6b86a561dd22d1 to your computer and use it in GitHub Desktop.
BCC all PMPro Register/Checkout Emails to a Certain Address
This file contains hidden or 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
<?php | |
/* | |
Add bcc for checkout emails | |
*/ | |
function my_pmpro_email_headers_admin_emails($headers, $email) { | |
//bcc checkout emails | |
if(strpos($email->template, "checkout_") !== false) { | |
//add bcc | |
$headers[] = "Bcc:" . "[email protected]"; | |
} | |
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