Custom order for tickets (Woocommerce)

Home Forums Ticket Products Event Tickets Plus Custom order for tickets (Woocommerce)

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1190788
    Pekka
    Participant

    Refering to https://theeventscalendar.com/knowledgebase/changing-the-order-of-tickets/
    I was about to ask how to create a custom order for tickets using SKU as reference, but I sniffed out that myself. I just want to share the snippet to functions.php file in case someone else needs it:

    function tribe_wootickets_custom_sort($p, $q) {
    	$sku_p= get_post_meta( $p->ID, '_sku', true );
    	$sku_q= get_post_meta( $q->ID, '_sku', true );
            if ($sku_p < $sku_q) return -1;
            if ($sku_p > $sku_q) return 1;
            return 0;
    }
    #1191188
    Andras
    Keymaster

    Pekka, WOW!!!

    A big thank you for sharing this. This will be super useful for some people I’m sure. I personally love it! The with the SKU names it is fairly easy to create any order I want.

    Much appreciated! Thank again!

    Have a great weekend!

    Cheers,
    Andras

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Custom order for tickets (Woocommerce)’ is closed to new replies.