Using Tickets/Tickets Plus template tags/API functions?

Home Forums Ticket Products Event Tickets Plus Using Tickets/Tickets Plus template tags/API functions?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1358010
    trad
    Participant

    Is there a trick to using Tickets/Tickets Plus template tags or API functions elsewhere in WordPress site?

    I am building a custom dashboard and would like to show the number of attendees for a given event.

    I have used Events Calendar functions without issue – e.g. tribe_get_events() – but when I try to use Tickets Plus functions like tribe_tickets_get_attendees() I am getting the standard PHP “Call to undefined function” error.

    Is there something I need to do to allow use of those functions? Any includes etc. required?

    #1358691
    Cliff
    Member

    Hi. Sorry you’re having difficulty here.

    Functions available inĀ https://github.com/moderntribe/event-tickets/blob/4.5.6/src/template-tags/tickets.php should work anywhere throughout your site, assuming all the plugins (at least Event Tickets plugin) have loaded at the time you’re trying to use it.

    I’m guessing your dashboard is loading as a plugin and is running its code too early.

    Your plugin might need to “wait” by not running until a later hook.

    Please let me know how this goes for you.

    #1368748
    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 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Using Tickets/Tickets Plus template tags/API functions?’ is closed to new replies.