View Orders list breaks when ticket deleted

Home Forums Ticket Products Event Tickets Plus View Orders list breaks when ticket deleted

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1221887
    Brian
    Participant

    Admin view Orders for an event breaks when a ticket is manually deleted, but the matching Attendee is not manually deleted. Error on Line 389 in table.php. Looks like you are using the attendee list as the driver for the foreach loop that is looking for the matching orders. Might be a simple fix to wrap a statement around that to skip to next one if there is no matching Order for the Attendee. Once we manually delete the orphan attendee, then the Order list comes up fine. We are using version 4.3.5 of Event Tickets Plus.

    This is the code in question, the last code line is number 389 in the table.php file in our version:

    foreach ( $query->posts as &$item ) {
    $order_id = get_post_meta( $item->ID, Tribe__Tickets_Plus__Commerce__WooCommerce__Main::ATTENDEE_ORDER_KEY, true );

    if ( isset( $orders[ $order_id ] ) ) {
    continue;
    }

    $order = WC()->api->WC_API_Orders->get_order( $order_id );
    $orders[ $order_id ] = $order[‘order’];
    }

    #1222696
    Nico
    Member

    Hi there Saurabh,

    Thanks so much for the report, and for pointing the code generating this!

    I’ll give this a try with the latest version of the plugins. If I can reproduce the issue then I’ll log it as a bug, and try to find a temp fix for this.

    Be back to you soon,
    Best,
    Nico

    #1231265
    Nico
    Member

    Hey Saurabh,

    Sorry for the delay here! This was out of my radar for a few days and just realized this was still waiting on me this morning!

    I could test this out but couldn’t reproduce the error with latest version of all plugins. This was the test:

    – Create Event
    – Added a WooCommerce ticket
    – Made a purchase + completed the order
    – Manually deleted the ticket from the Event edit screen
    – Browsed the Attendee list, no problems there

    Can you please let me know if the testing steps were correct? If that’s the case please re-test with latest versions of the plugins and let me know if you still see the error.

    Best,
    Nico

    #1248357
    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 4 posts - 1 through 4 (of 4 total)
  • The topic ‘View Orders list breaks when ticket deleted’ is closed to new replies.