Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Sort tickets by price
- if (!function_exists('custom_wooticket_pricesort')) {
- function custom_wooticket_pricesort($p, $q) {
- if ($p->price < $q->price) return -1;
- if ($p->price > $q->price) return 1;
- return 0;
- }
- }
- // Let's order the tickets in ascending order by price
- usort($tickets, 'custom_wooticket_pricesort');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement