Determine Ticket Type

Home Forums Ticket Products Event Tickets Plus Determine Ticket Type

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1065489
    Dan Feeley
    Participant

    Is there an easy way (from within the Events Calendar single event template) to determine if the ticket(s) attached are either WooCommerce or RSVP and retrieve their ticket ID(s)?

    #1066091
    Josh
    Participant

    Hey Dan,

    Thanks for reaching out to us!

    You should be able to get the information the way that you’d like. Would you mind giving a little more detail about what you’re trying to accomplish? I’d like to get you pointed in the right direction with a snippet but this could go a couple of different directions depending on the use.

    Thanks!

    #1066760
    Dan Feeley
    Participant

    We use an image overlay on each event to show whether that event is soldout or only has a few remaining tickets left. And since 4.x I can’t get them to stop removing people from the attendee list that are no longer attending. When they do that there’s a mismatch in the stock count which causes an discrepancy with the overlay.

    I’ve been following this thread which may help but I will still have a problem if they delete someone. My basic goal is to determine what type of ticket is attached and if it is a wooticket to take the inventory from woocommerce and if it is a RSVP to use tribe_events_has_soldout().

    Hope that makes sense…

    #1067890
    Josh
    Participant

    Hey Dan,

    Thanks for following up and providing the additional information.

    You can use:

    
    Tribe__Tickets__Tickets::get_all_event_tickets( $event->ID );
    

    to get the tickets associated with the event. You could then test the post_type for that ticket to see if it is a WooCommerce product or you could check the meta for that product to see if it contains a “_tribe_wooticket_for_event” meta value.

    Let me know if this helps.

    Thanks!

    #1068258
    Dan Feeley
    Participant

    I think this will do perfectly, thank you.

    #1070261
    Josh
    Participant

    Hey Dan,

    No problem! I’ll leave this ticket open in case there are further questions/issues when looking into this approach.

    Thanks!

    #1071237
    Dan Feeley
    Participant

    I think it’s safe to close it. I was able to successfully get everything I needed out of it (and some).
    Thanks again.

    #1071832
    Josh
    Participant

    Hey Dan,

    Awesome!

    I’ll go ahead and close this thread for now. If you have any further questions, please don’t hesitate to open a new one.

    Thanks!

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Determine Ticket Type’ is closed to new replies.