Forum Replies Created
-
AuthorPosts
-
December 7, 2015 at 8:05 am in reply to: Sort tickets (email & order review) by event date & time, not order added to car #1036930
Port
ParticipantThanks for the info on the plugin updates and for the direction w/usort, Brian! I’ll work on this asap and report back here.
December 7, 2015 at 6:59 am in reply to: Sort tickets (email & order review) by event date & time, not order added to car #1036859Port
ParticipantHi Brian,
We’re not using Events Tickets Plus — we’re using The Events Calendar Pro and WooTickets.
I’ve copied plugins/the-events-calendar/src/views/tickets/email.php into the appropriate directory in my theme folder and have successfully customized other things. In this file, there’s a line: foreach ( $tickets as $ticket ) {, however I don’t see a query above it where I can try and sort via Event Start Date & Time.
**I see plugins/wootickets/src/Tribe/Email.php, and in that file on line 61, I see get_content_html(), and its query args — can I not duplicate this file in my themes folder and modify it the way I’d modify any other plugin template? (so that my changes aren’t over-written)
– is there simply not a function I can add to my functions.php file to sort tickets in cart/checkout/order/email by Event Start Date & Time?
December 4, 2015 at 1:47 pm in reply to: Sort tickets (email & order review) by event date & time, not order added to car #1035758Port
ParticipantUpdate: I found a function that sorts alphabetically by Title:
add_filter( ‘woocommerce_order_get_items’, function( $items, $order ) {
uasort( $items,
function( $a, $b ) {
return strnatcmp( $a[‘name’], $b[‘name’] );
}
);
return $items;
}, 10, 2 );That works on the following views:
– Checkout > Confirmation
– My Account > Orders > viewing a single orderHow can that be modified to work in the emailed tickets? More importantly, how can it be modified to sorty by Event date?
-
AuthorPosts
