Programatically check whether an event has tickets or not?

Home Forums Ticket Products Event Tickets Plus Programatically check whether an event has tickets or not?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #103673
    Josh
    Participant

    My site (still being developed locally) uses Event Calendar Pro and Woocommerce Tickets but not every event will have a ticket attached to it. Is there any kind of template tag or way that I can check if an event has a ticket attached to it?

    #104142
    Brook
    Participant

    Howdy lejazz,

    That is definitely possible, and will be easy enough to do. Simply add this snippet to your theme’s functions.php file. This adds the new function tribe_get_wooticket_amount(). Uses this to figure out how many events a ticket has. If it equals zero, there are no tickets.

    Will that do what you need? Please let me know. Cheers!

    – Brook

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Programatically check whether an event has tickets or not?’ is closed to new replies.