getting bcc copy of ticket email to client

Home Forums Ticket Products Event Tickets Plus getting bcc copy of ticket email to client

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1167360
    John Paul
    Participant

    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;
    }

    #1167764
    Cliff
    Member

    Hi 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?

    #1167816
    John Paul
    Participant

    HI, 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?

    #1168167
    Cliff
    Member

    Hi 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.

    #1168660
    John Paul
    Participant

    this has worked a treat … nice one !!!!!!

    many thanks

    #1168683
    John Paul
    Participant

    so 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

    #1169016
    Cliff
    Member

    John,

    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?

    #1169679
    John Paul
    Participant

    I do not have this option. But I am still on version 4.2.5. Was this a recent update?

    #1169788
    John Paul
    Participant

    soved, 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

    😉

    #1169941
    Cliff
    Member

    Ooh, 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.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘getting bcc copy of ticket email to client’ is closed to new replies.