How to stop sending email tickets after the order was completed??

Home Forums Ticket Products Event Tickets Plus How to stop sending email tickets after the order was completed??

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #998691
    Emiliano Pasini
    Participant

    Hi, I don’t want to send any tickets, the order confirmation is enough, it is possible to stop sending tickets?
    Thanks,
    Emiliano

    #998739
    George
    Participant

    Hey Emiliano,

    If you head to your theme’s functions.php file, you should be able to turn this email-sending off by adding the following bit of code to that file:


    remove_action( 'wootickets-send-tickets-email', array( 'Tribe__Events__Tickets__Woo__Email', 'trigger' ) );

    Let me know if that helps!

    #998776
    Emiliano Pasini
    Participant

    Hi, I did that but I’m still receiving tickets/emails, another way??

    #998810
    George
    Participant

    Hey @emiliano,

    Hm, sorry about that! This works for me so I’m not quite sure what the issue is, but there are two more things to try. First, try adding the “priority” to that remove_action() call, so that it looks like this:


    remove_action( 'wootickets-send-tickets-email', array( 'Tribe__Events__Tickets__Woo__Email', 'trigger' ), 10 );

    If that still does not work, then try replacing the code altogether with this instead:


    remove_all_actions( 'wootickets-send-tickets-email', 10 );

    I hope this helps!

    #999287
    Emiliano Pasini
    Participant

    Hi, I just try that and still is not working, I keep receiving tickets.

    mm another alternative would be to edit the ticket,
    The root for the Complete order is here woocommerce/emails/customer-completed-order.php.
    Could you please let me know where is the root to edit the ticket.

    Thanks,
    Emiliano

    #999439
    George
    Participant

    Sorry that has not worked Emiliano! Customizing that file you mentioned is not a good idea, unless we absolutely have to. But I think I have one more snippet that will work for you.

    Instead of the other snippets I recommended, try adding this one to your theme’s functions.php file:


    add_action( 'woocommerce_email_classes', 'remove_wootickets_email', 100 );

    function remove_wootickets_email() {
    remove_all_actions('wootickets-send-tickets-email');
    }

    #999455
    Emiliano Pasini
    Participant

    Hi, this code works, the problem is that I’m loosing all the the other action functions ( as Processing and Complete order ). In this case, I won’t be able to resend any email in case the user haven’t received the automated one.

    Sorry about that, I thought that removing the ticket email would be much easier,

    Thanks,
    Emiliano

    #999590
    Brian
    Keymaster

    Hi try this…

    https://gist.github.com/jesseeproductions/7ec5827ffa34a3995dc9

    The filter you can use to remove the message that tickets will be sent.

    Let us know how that works.

    Thanks

    #1000042
    George
    Participant

    Hey Emiliano,

    Any luck with the solution that Brian shared? It’s a great solution and I hope it works for you! 🙂

    (And thanks for sharing that, Brian!)

    – George

    #1004523
    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 10 posts - 1 through 10 (of 10 total)
  • The topic ‘How to stop sending email tickets after the order was completed??’ is closed to new replies.