Created
December 20, 2018 18:57
-
-
Save kimcoleman/4c8ae7469b087da0f1312eac7df8fe1d to your computer and use it in GitHub Desktop.
Bcc additional email addresses on all PMPro emails sent to the member.
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 | |
/* | |
* Bcc additional email addresses on all PMPro emails sent to the member. | |
*/ | |
function bcc_on_member_email_headers( $headers, $email ) { | |
//bcc emails not already going to admin_email | |
if ( $email->email != get_bloginfo( 'admin_email' ) ) { | |
//add bcc | |
$headers[] = "Bcc:" . "[email protected],[email protected]"; | |
} | |
return $headers; | |
} | |
add_filter( 'pmpro_email_headers', 'bcc_on_member_email_headers', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment