Home › Forums › Ticket Products › Event Tickets Plus › Add BCC for all tickets
- This topic has 2 replies, 2 voices, and was last updated 9 years, 1 month ago by Barry.
-
AuthorPosts
-
February 12, 2015 at 8:03 am #941988JGParticipant
Hi,
Can I add a BCC address for all tickets that are being sent out?
Thanks,
JGFebruary 12, 2015 at 8:43 am #942000BarryMemberHi JG,
Great question!
Our ticket emails are sent out through WooCommerce, which in turn uses functionality baked into WordPress.
Both of these provide opportunities to customize what is sent – not only in terms of the actual content but the recipient and any BCCs, etc.
WooCommerce for instance provide the woocommerce_email_headers filter hook which lets you modify the email headers (thus you could add one or more BCCs). To target the ticket email specifically, you could first listen out for the wootickets-send-tickets-email action being fired, so the code would take this sort of shape:
add_action( 'wootickets-send-tickets-email', 'listen_for_ticket_emails' ); function listen_for_ticket_emails() { add_filter( 'woocommerce_email_headers', 'add_ticket_bcc' ); } function add_ticket_bcc( $headers ) { // We don't want to impact on other emails, // so remove the callback immediately remove_filter( 'woocommerce_email_headers', 'add_ticket_bcc' ); // (...insert your code to add a BCC here...) return $headers; }
That’s not going to anything by itself – you’ll need to expand it a little to actually add the BCC addresses, but it hopefully gives you a general outline you can build on 🙂
March 5, 2015 at 2:34 pm #946326BarryMemberHi! It’s been a while so I’m going to go ahead and close this thread. If we can help with anything else, though, please don’t hesitate to create new threads as needed. Thanks
-
AuthorPosts
- The topic ‘Add BCC for all tickets’ is closed to new replies.