Created
December 7, 2018 23:44
-
-
Save kimcoleman/5641bb9f25ca1b47d35fef7aecf78eea to your computer and use it in GitHub Desktop.
BCC an additional email on the Member Invoice 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
<?php | |
/* | |
* BCC an additional email on the Member Invoice emails | |
*/ | |
function my_pmpro_email_headers_bcc_on_invoice_email( $headers, $email ) { | |
if ( strpos( $email->template, 'invoice' ) !== false ) { | |
//add bcc | |
$headers[] = "Bcc:" . "[email protected]"; | |
} | |
return $headers; | |
} | |
add_filter( 'pmpro_email_headers', 'my_pmpro_email_headers_bcc_on_invoice_email', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment