Home › Forums › Ticket Products › Event Tickets Plus › I need to trigger a function once a ticket is purchased
- This topic has 7 replies, 4 voices, and was last updated 9 years, 6 months ago by
Travis.
-
AuthorPosts
-
September 14, 2016 at 7:04 am #1163874
Travis
ParticipantI use Event Tickets Plus to sell seminar tickets with good results. I would now like to start selling tickets to a webinar.
I plan on using GoToWebinar because I already have an account established with them. GoToWebinar have an API where I can upload participant registration so that the participant doesn’t have to enter the some thing twice.
I’m looking for a function, hook, filter, anything that I can use to identify an Attendee’s name and email and apply that to the GoToWebinar API.
I was wondering about inserting code into the email.php, so that when the Attendee receives their ticket information I can insert a small function to check whether the ticket is to a webinar and then use custom fields in the event to store Webinar Keys and the like.
Is there a better way? I’ve been looking through the Codex and Knowledgeable for a while but haven’t found anything similar.
Thanks,
TravisSeptember 14, 2016 at 4:16 pm #1164323Josh
ParticipantHey Travis,
Thanks for reaching out to us!
You could definitely add the additional information to the ticket email. However, I’m pretty sure you could trigger a function on ticket sale as well. For that, which ecommerce solution will you be using along with the Event Tickets Plus plugin for selling your tickets?
Thanks!
September 14, 2016 at 9:34 pm #1164428Travis
ParticipantThanks for replying, I’m using WooCommerce.
September 16, 2016 at 9:08 am #1165177Josh
ParticipantHey Travis,
Thanks for following up here.
Take a look at this quick snippet:
https://gist.github.com/BeardedGinger/8791522a18a1624bd8ccbba66e0287b5
This will run on a completed WooCommerce transaction and I’ve added some boilerplate there for you to test if it was a ticket sale. You can further customize from there to add the GoTo Meeting API calls and send the information based on the order there.
Let me know if this helps.
Thanks!
September 28, 2016 at 11:27 pm #1170234Travis
ParticipantThat’s brilliant, thank you for making that for me. I’ll get things set-up over the weekend and give it a run.
September 29, 2016 at 7:06 am #1170342Josh
ParticipantHey Travis,
Awesome! Happy to help.
I’ll leave this thread open for a bit in case you want to come back here after testing it out over the weekend.
Thanks!
October 21, 2016 at 9:35 am #1180656Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘I need to trigger a function once a ticket is purchased’ is closed to new replies.
