Skip to content

Instantly share code, notes, and snippets.

@kimcoleman
Created December 20, 2018 18:57
Show Gist options
  • Select an option

  • Save kimcoleman/4c8ae7469b087da0f1312eac7df8fe1d to your computer and use it in GitHub Desktop.

Select an option

Save kimcoleman/4c8ae7469b087da0f1312eac7df8fe1d to your computer and use it in GitHub Desktop.
Bcc additional email addresses on all PMPro emails sent to the member.
<?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:" . "otheremail@domain.com,anotheremail@domain.com";
}
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