I am looking for woocommrce sorting with multiple order like "orderby _sales_price, _price".
get_catalog_ordering_args( $orderby = '', $order = '' ) {
switch ( $orderby ) {
default :
//Defult PATCH;
//$args['orderby'] = 'menu_order title';
$args['orderby'] = 'meta_value_num';
#$args['order'] = $order == 'DESC' ? 'DESC' : 'ASC';
$args['order'] = 'DESC';
#$args['meta_key'] = '';
$args['meta_key'] = '_sale_price';
#echo "<pre>";print_r($ordering);exit;
break;
}
}
here is only Important is i make change in return argument with
$args['orderby'] = 'meta_value_num';
$args['order'] = 'DESC';
$args['meta_key'] = '_sale_price';
Now my One level of issue is fixed but i am looking more customization here via order on multiple field like
$args['orderby'] = 'meta_value_num';
$args['order'] = 'DESC';
$args['meta_key'] = '_sale_price, _price';
Let me know if any information required and not getting for the same.
Regards, Jigar
here i found my answer.
}