I’m trying to create a conditional statement to display a message if there are no tickets (WooTickets) connected to the event inside a custom events query loop.
if (function_exists(‘tribe_get_ticket_form’) && tribe_get_ticket_form()) {
tribe_get_ticket_form();
} else {
echo “Not For Sale Yet”;
}
I would like to show this message for when there is not yet a ticket created (or maybe there will never be an online ticket) for an event, however I can’t for the life of me get this to work. The code above outputs the else statement on all events, regardless if there is a ticket or not.
Originally I thought I would mess with “$is_there_any_product” inside Tickets.PHP, however I’m pretty positive now that the tickets.PHP form doesn’t even load if there are no tickets.
Could someone guide me with some insight on how I could get this to work?
Thank you!