How to deactivate ticket mail?

Home Forums Ticket Products Event Tickets Plus How to deactivate ticket mail?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1096836
    Stefan
    Participant

    Hi,

    where can I deactivate the ticket mail?
    I do not want to send out this mail after the order is successful because we have other processes in place.

    Thank you in advance.

    Kind regards,
    Stefan

    #1096855
    Brian
    Member

    Hi,

    Thanks for using our plugins. I can help out here.

    We have this snippet to disable the Ticket Emails in WooCommerce.

    You can use the following snippet in your theme’s functions.php to change it:

    /*
    * Events Tickets Plus - WooCommerce Tickets - Prevent Ticket Email from being sent.
    * @ Version 4.1
    */
    add_action( 'init', 'wootickets_stop_sending_email' );
    function wootickets_stop_sending_email() {
    if ( class_exists( 'Tribe__Tickets_Plus__Commerce__WooCommerce__Main' ) ) {
    $woo = Tribe__Tickets_Plus__Commerce__WooCommerce__Main::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' ) );
    }
    }

    Does that work?

    #1096885
    Stefan
    Participant

    Hi Brian,

    thank you for your answer.
    Do I only need to copy that into the functions.php?

    I tried that and the code showed up in the header of the site. Must be some kind of newby-mistake by me I guess.
    Any idea?

    Kind regards,
    Stefan

    #1096895
    Brian
    Member

    Try adding this before before the closing php tag:

    ?>

    #1096983
    Stefan
    Participant

    Thank you Brian, that worked!

    Kind regards,
    Stefan

    #1097007
    Brian
    Member

    Great, glad it helps, I am going to go ahead and close this ticket, but if you need help on this or something else please post a new ticket.

    Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘How to deactivate ticket mail?’ is closed to new replies.