Disable sending tickets via email

Home Forums Ticket Products Event Tickets Plus Disable sending tickets via email

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #933877
    Bettina Schwidder
    Participant

    Hello there,

    I have a question regarding to sending out the tickets after completing a order.
    Is there a way to disable it? Unfortunately there is not check mark to control it like for sending emails after ordering or completing the order.

    Thank you in advance.

    Bettina

    #934501
    Josh
    Participant

    Hey Bettina,

    Thanks for reaching out to us!

    Try adding the following snippet to your theme’s “functions.php” file:

    
    add_action( 'init', 'wootickets_stop_sending_email', 99 );
    function wootickets_stop_sending_email() {
    $woo = TribeWooTickets::get_instance();
    remove_filter( 'woocommerce_email_classes', array( $woo, 'add_email_class_to_woocommerce' ) );
    add_action( 'woocommerce_email_after_order_table', array( $woo, 'add_tickets_msg_to_email' ) );
    }
    

    Let me know if this helps.

    Thanks!

    #934616
    Bettina Schwidder
    Participant

    Hey Josh,

    great – thank you for your quick response.
    I have included the snippet and all tests are working fine!

    Best
    Bettina

    #934622
    Bettina Schwidder
    Participant

    Oh, I have one more question.

    There is the following information included in the email for a new order: You will get your tickets in a separate email.
    (it is maybe a little different because I have the german translation)
    I want to delete/disable it too. Where can I find it?

    Thank you so much again for your support – and I appreciate the great work of your team.

    Best from Berlin
    Bettina

    #936302
    Josh
    Participant

    Hey,

    Sorry for the delay!

    You can remove the ticket notification from that email by adding additional line to the previous snippet. The updated snippet would look like:

    
    <pre>add_action( 'init', 'wootickets_stop_sending_email', 99 );
    function wootickets_stop_sending_email() {
    $woo = TribeWooTickets::get_instance();
    remove_filter( 'woocommerce_email_classes', array( $woo, 'add_email_class_to_woocommerce' ) );
    remove_action( 'woocommerce_email_after_order_table',  array( $this, 'add_tickets_msg_to_email' ), 10, 2  );
    }</pre>
    

    Let me know if this helps.

    Thanks!

    #937374
    Bettina Schwidder
    Participant

    Hey Josh,

    no problem and thank you – I am also late this time!

    I will try it and let you know.

    Best
    Bettina

    #938012
    Josh
    Participant

    Hey Bettina,

    Sounds great! Look forward to hearing back from you.

    Thanks!

    #939187
    Bettina Schwidder
    Participant

    Hey Josh,

    I didn’t work! There is still the information included.
    Unfortunately I can’t add a screenshot here to show you.

    Best, Bettina

    #939420
    Josh
    Participant

    Hey Bettina,

    Sorry about that. Try this:

    
    <pre>add_action( 'init', 'wootickets_stop_sending_email', 99 );
    function wootickets_stop_sending_email() {
    $woo = TribeWooTickets::get_instance();
    remove_filter( 'woocommerce_email_classes', array( $woo, 'add_email_class_to_woocommerce' ) );
    remove_action( 'woocommerce_email_after_order_table',  array( $woo, 'add_tickets_msg_to_email' ), 10, 2  );
    }</pre>
    

    Let me know if this helps.

    Thanks!

    #939821
    Bettina Schwidder
    Participant

    Hey Josh,

    great – now it works!

    Thank you so much for your help.

    Best from Berlin
    Bettina

    #940123
    Josh
    Participant

    Hey Bettina,

    No problem! Glad we were able to get this working for you.

    I’ll go ahead and close this ticket for now. If you have any further questions, please don’t hesitate to open a new one.

    Thanks!

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Disable sending tickets via email’ is closed to new replies.