-
-
Save kimwhite/598a3b16ce25f3f6d7f81c84eaad9ed5 to your computer and use it in GitHub Desktop.
BCC a second email address on PMPro admin emails.
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
| /* | |
| Add bcc for PMPro admin emails. | |
| Change [email protected],[email protected] below to the addresses 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 protected],[email protected]"; | |
| } | |
| return $headers; | |
| } | |
| add_filter("pmpro_email_headers", "my_pmpro_email_headers_bcc", 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment