Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JarrydLong/c825fb4f033cfa4799aba051e5647465 to your computer and use it in GitHub Desktop.
Save JarrydLong/c825fb4f033cfa4799aba051e5647465 to your computer and use it in GitHub Desktop.
<?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