WC_Query::order_by_price_asc_post_clauses()
Handle numeric price sorting.
Method of the class: WC_Query{}
No Hooks.
Return
Array
.
Usage
$WC_Query = new WC_Query(); $WC_Query->order_by_price_asc_post_clauses( $args );
- $args(array) (required)
- Query args.
WC_Query::order_by_price_asc_post_clauses() WC Query::order by price asc post clauses code WC 7.7.0
public function order_by_price_asc_post_clauses( $args ) { $args['join'] = $this->append_product_sorting_table_join( $args['join'] ); $args['orderby'] = ' wc_product_meta_lookup.min_price ASC, wc_product_meta_lookup.product_id ASC '; return $args; }