Skip to content

Instantly share code, notes, and snippets.

@chikaibeneme
Created November 29, 2024 04:45
Show Gist options
  • Select an option

  • Save chikaibeneme/35e2ba38aa0f491544a2add60b908890 to your computer and use it in GitHub Desktop.

Select an option

Save chikaibeneme/35e2ba38aa0f491544a2add60b908890 to your computer and use it in GitHub Desktop.
Add a custom BCC for the RSVP email (All ticket emails)
<?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