Changing the trigger for the Event Ticket email

Home Forums Ticket Products Event Tickets Plus Changing the trigger for the Event Ticket email

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1117705
    James
    Participant

    Hi Guy’s and Gals,

    Just a quick question (I hope).

    By default the email containing the event ticket is sent to the customer when the status in woocommerce > orders is set to completed order.

    Can I change the email being triggered by a different status setting?

    I am using the WooCommerce Order Status & Actions Manager plugin and have a custom status called “Booking Confirmed” which I would like to be the status that send the ticket.

    My problem is at moment is that I take deposits on large priced events and when the customer pays the deposit by PayPal it automatically sets the status to Completed Order and this sends the Event Calendar Ticket before the customer has paid full price.

    Any assistance would be appreciated.

    Cheers

    James

    • This topic was modified 9 years, 11 months ago by James.
    #1117718
    George
    Participant

    Thanks for reaching out, James!

    Changing the trigger is indeed technically possible, but would require diving into the plugin code directly and, well, manually changing the code that triggers the email yourself.

    We cannot help with code modifications and such (click here), so you’ll have to take the reins on this change yourself or hire a professional to make the change for you.

    As a quick bit of advice to help you get started, though, to find all of the relevant code for the email actions for WooCommerce, head to this file in your Event Tickets Plus plugin files:

    event-tickets-plus/src/Tribe/Commerce/WooCommerce/Email.php

    You’ll see there that the email is “triggered” upon the firing of the action wootickets-send-tickets-email, i.e.:


    // Triggers for this email
    add_action( 'wootickets-send-tickets-email', array( $this, 'trigger' ) );

    So to modify things, do a “find in folder” search for the term , and you’ll see that the actual action call is located in this file:

    event-tickets-plus/src/Tribe/Commerce/WooCommerce/Main.php

    ☝️ That file is what connects the action to the “Complete” order status, so from here your task would be to head into that file; un-hook the action from the “Complete” order status; and then re-hook the action somewhere else that better suits your needs.

    Best of luck with your customizing!
    George

    #1117972
    James
    Participant

    Hi George,

    Thanks for the reply and help.

    The short story is, I found the code you “hinted” at but I can’t find the correct replace hook name, so I think I will abandon this idea as I just don’t have the where and know how.

    Another thought though, is there a way to turn off the Ticket email being sent automatically so I can trigger it manually?

    Cheers

    James

    #1118026
    James
    Participant

    George, disregard my request for turning off the Ticket email, I found some code on the forum of how to do it, https://theeventscalendar.com/support/forums/topic/turning-off-one-of-automated-emails/

    Cheers

    James

    #1118076
    James
    Participant

    You can close this thread George.

    I’m going with the “disabled ticket” option. I’ve set it up now using my own confirmation email and it works great! 🙂

    Thanks for the help.

    • This reply was modified 9 years, 11 months ago by James.
    #1118154
    George
    Participant

    Glad to hear it—thank you for these updates!

    Cheers,
    George

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Changing the trigger for the Event Ticket email’ is closed to new replies.