Created
November 29, 2024 04:45
-
-
Save chikaibeneme/35e2ba38aa0f491544a2add60b908890 to your computer and use it in GitHub Desktop.
Add a custom BCC for the RSVP email (All ticket 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 | |
| //* Do NOT include the opening php tag | |
| /** | |
| * If you want the BCC added to all ticket-related emails, regardless of type. | |
| * Useful for broader email handling, especially if your organization manages multiple ticket types. | |
| */ | |
| add_filter( 'tribe_tickets_email_headers', function( $headers, $ticket_id ) { | |
| // Add BCC email address | |
| $bcc_email = 'youremail@mail.com'; | |
| $headers[] = 'Bcc: ' . $bcc_email; | |
| // Optional: log to check headers | |
| error_log( 'BCC added to email headers: ' . print_r( $headers, true ) ); | |
| return $headers; | |
| }, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment