I need to trigger a function once a ticket is purchased

Home Forums Ticket Products Event Tickets Plus I need to trigger a function once a ticket is purchased

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1163874
    Travis
    Participant

    I 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,
    Travis

    #1164323
    Josh
    Participant

    Hey 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!

    #1164428
    Travis
    Participant

    Thanks for replying, I’m using WooCommerce.

    #1165177
    Josh
    Participant

    Hey 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!

    #1170234
    Travis
    Participant

    That’s brilliant, thank you for making that for me. I’ll get things set-up over the weekend and give it a run.

    #1170342
    Josh
    Participant

    Hey 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!

    #1180656
    Support Droid
    Keymaster

    Hey 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

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘I need to trigger a function once a ticket is purchased’ is closed to new replies.