Created
March 17, 2025 12:21
-
-
Save JarrydLong/c825fb4f033cfa4799aba051e5647465 to your computer and use it in GitHub Desktop.
This file contains 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 //do not copy | |
function my_pmpro_email_headers_admin_emails( $headers, $email ) { | |
// BCC emails already going to admin_email. | |
if ( strpos( $email->template, '_admin' ) !== false ) { | |
if ( intval( $email->data['membership_id'] ) == 2 ) { | |
$headers[] = 'Bcc:' . '[email protected]'; | |
// $headers[] = 'Bcc:' . '[email protected],[email protected],[email protected]'; //Example with multiple BCC emails | |
} | |
} | |
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