Disable tickets email for some events

Home Forums Ticket Products Event Tickets Plus Disable tickets email for some events

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1103149
    Riccardo
    Participant

    Hi,
    is it possibile disable the ticket email only for custom events?
    thanks

    #1103326
    Geoff B.
    Member

    Good evening Riccardo and welcome back!

    Thank you for reaching out to us.

    I would love to help you with this topic.

    The answer is yes, it is possible. But you would need to modify slightly the following snippet to do so:

    /*
    * Events Tickets Plus - WooCommerce Tickets - Prevent Ticket Email from being sent.
    * @ Version 4.0
    */
    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' ) );
    }
    }

    /*
    * Events Tickets Plus – WooCommerce Tickets – Hide You’ll receive your tickets in another email.
    * @ Version 4.0
    */
    add_filter( ‘wootickets_email_message’, ‘woo_tickets_filter_completed_order’, 10 );
    function woo_tickets_filter_completed_order( $text ) {
    $text = “”;

    return $text;
    }

    Just to set expectations, as you might know, the scope of our support is mostly to get our wonderful customers started on the right track to customize their site and to help them in case of issues. We unfortunately do not provide complete support for customization.

    Finally, if you don’t feel confortable modifying the snippet, you could hire one of our recommended customizers to do the customization for you.

    Let me know if that helps.

    Have a great day!

    Geoff B.

    #1103401
    Riccardo
    Participant

    Hi Geoff!
    Thanks but your code is to disable ALL tickets events.
    So I want disable only for some events, not for all!

    thanks

    #1104030
    Geoff B.
    Member

    Good evening Riccardo,

    I realize you are trying to remove the email only for certain categories.
    This is what I meant when I said that you will need to tweak the code (by adding an IF conditional with the categories you want to exclude).

    As pointed out earlier, unfortunately, the scope of our support is to get our customers started on the right track to customize their site and to help them in case of issues. We do not provide complete support for customization.

    If tweaking the code is slightly beyond your confort zone, you might want to hire one of our recommended customizers to do the customization for you.

    I wish I had a better answer for you, but for now it’s the best one I have.

    Best regards,

    Geoff B.

    #1110095
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Disable tickets email for some events’ is closed to new replies.