Created
January 30, 2016 01:18
-
-
Save cliffordp/74b66ceb1a15ce025e7f to your computer and use it in GitHub Desktop.
Send Event Tickets RSVP/purchase email to multiple recipients (e.g. site admin email or custom email) -- NOTE: sends to all recipients in single email (not CC or BCC, which would be preferable)
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 | |
// From https://gist.github.com/cliffordp/74b66ceb1a15ce025e7f | |
// Send Event Tickets RSVP/purchase email to multiple recipients (e.g. site admin email or custom email) | |
// NOTE: sends to all recipients in single email (not CC or BCC, which would be preferable) | |
// @link: https://github.com/moderntribe/event-tickets/blob/release/122/src/Tribe/RSVP.php#L373 | |
add_filter( 'tribe_rsvp_email_recipient', 'cliff_event_tickets_email_copy_to_admin', 30 ); | |
function cliff_event_tickets_email_copy_to_admin( $to ) { | |
$additional_recipients = array( | |
get_option( 'admin_email' ), // admin's email | |
// '[email protected]', // custom entry | |
); | |
if ( is_string( $to ) ) { | |
$additional_recipients[] = $to; | |
$to = $additional_recipients; | |
} elseif ( is_array( $to ) ) { | |
array_merge( $to, $additional_recipients ); | |
} else { | |
// | |
} | |
return $to; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment