Home › Forums › Ticket Products › Event Tickets Plus › getting bcc copy of ticket email to client
- This topic has 10 replies, 3 voices, and was last updated 7 years, 6 months ago by Cliff.
-
AuthorPosts
-
September 22, 2016 at 7:24 am #1167360John PaulParticipant
if I add the following snippet into my functions file, I can get a bcc copy of the order confirmation sent from woo to my clients. Is there anything similar I can use to get a bcc for the emails when they receive the tickets???
add_filter( ‘woocommerce_email_headers’, ‘mycustom_headers_filter_function’, 10, 2);
function mycustom_headers_filter_function( $headers, $object ) {
if ($object == ‘customer_completed_order’) {
$headers .= ‘BCC: My name <[email protected]>’ . “\r\n”;
}return $headers;
}September 22, 2016 at 7:55 pm #1167764CliffMemberHi John. Your code does look correct. FYI: We have a similar snippet at
https://gist.github.com/cliffordp/4f06f95dbff364242cf54a3b5271b182
However, I’m not understanding you wanting to “get a bcc for the emails when they receive the tickets”
Could you please explain the workflow / order of actions you’re desiring?
September 23, 2016 at 2:32 am #1167816John PaulParticipantHI, thanks for this,
the snippet I included works well for getting copies of the emails sent to client that confirms their order (which is sent via woocommerce email settings). But it does not give me a copy of the actual tickets that are sent for the event that the client sees.
I would like to be able to get a copy of the ticket email that the client gets. But I do not want the client to see we have been copied in on the email. So a BCC version would work well.
Does the snippet you link to on gitgub provide for this? or does it only work for RSVP emails?
September 23, 2016 at 3:05 pm #1168167CliffMemberHi John.
Here’s some code that may work for you or at least give you an idea how to proceed:
(Please note this code isn’t tested / verified to work.)
function modify_woo_ticket_headers( $headers ) { remove_filter( 'woocommerce_email_headers', 'modify_woo_ticket_headers' ); return $headers . "Bcc: [email protected]\r\n"; } function before_woo_tickets_sent() { add_filter( 'woocommerce_email_headers', 'modify_woo_ticket_headers' ); } add_action( 'wootickets-send-tickets-email', 'before_woo_tickets_sent', 5 );
Please let me know how this works for you.
September 26, 2016 at 3:43 am #1168660John PaulParticipantthis has worked a treat … nice one !!!!!!
many thanks
September 26, 2016 at 5:34 am #1168683John PaulParticipantso why did I need this ??? for information
if an email does not get delivered to the client (or they lose their email) there appears to be no way to re send them their tickets. In woocommerce you can resend order confirmation, but this does not resend the tickets.
It is therefore important that we have a copy so we can resend tot he client if needed.
Might be worth putting this in the development roadmap
best
September 26, 2016 at 8:37 pm #1169016CliffMemberJohn,
I’m glad that snippet worked well for you.
If you’re using Event Tickets Plus with WooCommerce, you can go to the WooCommerce Order and click into the “Order Actions” drop-down and click “Resend order emails > Tickets” — Screenshot: https://cl.ly/2X3J3y3a462F
Does that answer your question?
September 28, 2016 at 1:56 am #1169679John PaulParticipantI do not have this option. But I am still on version 4.2.5. Was this a recent update?
September 28, 2016 at 7:38 am #1169788John PaulParticipantsoved, I had some code in my functions file that overrides when it see the word ‘ticket’ for something else, so it was there all along just called something else
😉
September 28, 2016 at 10:46 am #1169941CliffMemberOoh, tricky. I’m glad you were able to find it and that this was the solution you were looking for.
Have a great rest of your week.
-
AuthorPosts
- The topic ‘getting bcc copy of ticket email to client’ is closed to new replies.