Wee Hang

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Retrieve Event ID from Ticket ID #1024851
    Wee Hang
    Participant

    I’m looking at bool(false) as the result.
    I am putting this code at woocommerce’s plugin in cart’s page. Not sure if it will affect or changes anything.

    in reply to: Retrieve Event ID from Ticket ID #1024232
    Wee Hang
    Participant

    Hi George,

    Thanks for the reply. So I have replaced the ticketID with the productID because as I have understood it, its the same right? But I am not able to retrieve the information of that said event but rather the result return is the product details in array. Did I miss out it somewhere?

    $tribe_woo = Tribe__Events__Tickets__Woo__Main::get_instance();
    $ticket_product = class_exists( ‘WC_Product_Simple’ ) ? new WC_Product_Simple( $cart_item[“data”]->id ) : new WC_Product( $cart_item[“data”]->id );

    $event = $tribe_woo->get_event_for_ticket( $ticket_product );

Viewing 2 posts - 1 through 2 (of 2 total)