Home › Forums › Ticket Products › Event Tickets Plus › Changing the trigger for the Event Ticket email
- This topic has 5 replies, 2 voices, and was last updated 9 years, 11 months ago by
George.
-
AuthorPosts
-
May 23, 2016 at 5:42 am #1117705
James
ParticipantHi 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.
May 23, 2016 at 5:56 am #1117718George
ParticipantThanks 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.phpYou’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!
GeorgeMay 23, 2016 at 3:00 pm #1117972James
ParticipantHi 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
May 23, 2016 at 4:57 pm #1118026James
ParticipantGeorge, 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
May 23, 2016 at 8:48 pm #1118076James
ParticipantYou 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.
May 24, 2016 at 6:22 am #1118154George
ParticipantGlad to hear it—thank you for these updates!
Cheers,
George -
This topic was modified 9 years, 11 months ago by
-
AuthorPosts
- The topic ‘Changing the trigger for the Event Ticket email’ is closed to new replies.
