<?php
//* Do NOT include the opening php tag

/**
* BCC custom email on all Event Tickets' RSVP ticket emails
*/

add_filter( 'tec_tickets_emails_dispatcher_rsvp_headers', 'my_add_bcc_email_headers' );

function my_add_bcc_email_headers( $headers ) {
	
	$headers['Bcc'] = 'YOUR NAME <[email protected]>';
	
	return $headers;
}

To add event organizers to the BBC for the RSVP Email you can use this modified version.

<?php
//* Do NOT include the opening php tag

add_filter( 'tec_tickets_emails_dispatcher_rsvp_headers', 'my_add_bcc_email_organizers_headers', 10, 2 );

function my_add_bcc_email_organizers_headers( $headers, $dispatcher ) {
	$email   = $dispatcher->get_email();
	$post_id = $email->get( 'post_id' );

	if ( ! $post_id || ! function_exists( 'tribe_get_event' ) )  {
		return $headers;
	}

	$event = tribe_get_event( $post_id );

	if ( empty( $event ) ) {
		return $headers;
	}

	// If the event has organizers set
	if ( ! tribe_has_organizer( $post_id ) ) {
		return $headers;
	}

	// Get the organizers
	$organizers = tribe_get_organizer_ids( $post_id );

	// Loop through the organizers
	foreach ( $organizers as $organizer_id ) {
		// Get the organizer email address
		$organizer_email = stripslashes_deep( html_entity_decode( tribe_get_organizer_email( $organizer_id ), ENT_COMPAT, 'UTF-8' ) );

		// Add the organizer email info to our emails array
		$emails[] = $organizer_email;
	}

	if ( empty( $emails ) ) {
		return $headers;
	}

	$headers['Bcc'] = implode( ",", $emails );

	return $headers;
}

The above snippets are for the RSVP ticket emails specifically. To do something similar for other (RSVP and Tickets Commerce) emails you need to use the appropriate version of the tec_tickets_emails_dispatcher_{$email_slug}_headers filter, where the $email_slug can have the following values:

  • rsvp
  • rsvp-not-going
  • ticket
  • completed-order
  • purchase-receipt