Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function modify_woo_ticket_headers( $header, $id, $object ) {
- remove_filter( 'woocommerce_email_headers', 'modify_woo_ticket_headers' );
- $organizer_email = tribe_get_organizer_email( $id, false );
- // add organizer email if it's a valid email address
- if ( is_email( $organizer_email ) ) {
- $header .= "Cc: " . $organizer_email . "\r\n";
- }
- return $header;
- }
- function before_woo_tickets_sent() {
- add_filter( 'woocommerce_email_headers', 'modify_woo_ticket_headers', 10, 3 );
- }
- add_action( 'wootickets-send-tickets-email', 'before_woo_tickets_sent', 5 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement