Advertisement
wpgenie

Sort my past tickets

Jun 2nd, 2022 (edited)
1,380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. add_filter( 'woocommerce_lottery_my_tickets_past_endpoint_query_args', 'custom_order_my_tickets_past' );
  2. function custom_order_my_tickets_past ( $args ){
  3.     $args['meta_key'] = '_lottery_dates_to';
  4.     $args['orderby']  = 'meta_value';
  5.     $args['order']    = 'DESC';
  6.     return $args;
  7. }
  8.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement