Home › Forums › Ticket Products › Event Tickets Plus › View Orders list breaks when ticket deleted
- This topic has 4 replies, 4 voices, and was last updated 7 years, 1 month ago by Brian.
-
AuthorPosts
-
January 21, 2017 at 8:27 am #1221887BrianParticipant
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’];
}January 23, 2017 at 6:51 pm #1222696NicoMemberHi 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,
NicoFebruary 8, 2017 at 6:09 am #1231265NicoMemberHey 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 thereCan 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,
NicoMarch 2, 2017 at 8:35 am #1248357Support DroidKeymasterHey 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 -
AuthorPosts
- The topic ‘View Orders list breaks when ticket deleted’ is closed to new replies.