Created
November 28, 2025 05:50
-
-
Save JarrydLong/17b55ce6201706d2cb16ba1ca22c033d to your computer and use it in GitHub Desktop.
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 //do not copy | |
| function my_pmpro_email_headers_email_confirmation( $headers, $email ) { | |
| if( ! function_exists( 'pmproec_isEmailConfirmationLevel' ) ) { | |
| return $headers; | |
| } | |
| // BCC email confirmation emails to another email address | |
| if ( | |
| ! empty( $email->data['membership_id'] ) && | |
| pmproec_isEmailConfirmationLevel( $email->data['membership_id'] ) && | |
| strpos( $email->template, "checkout" ) !== false | |
| ) { | |
| $headers[] = 'Bcc:' . 'otheremail@domain.com'; | |
| // $headers[] = 'Bcc:' . 'otheremail@domain.com,two@domain.com,three@domain.com'; //Example with multiple BCC emails | |
| } | |
| return $headers; | |
| } | |
| add_filter( 'pmpro_email_headers', 'my_pmpro_email_headers_email_confirmation', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment