WC_Admin_List_Table_Products::order_by_price_desc_post_clausespublicWC 1.0

Handle numeric price sorting.

Method of the class: WC_Admin_List_Table_Products{}

No Hooks.

Returns

Array.

Usage

$WC_Admin_List_Table_Products = new WC_Admin_List_Table_Products();
$WC_Admin_List_Table_Products->order_by_price_desc_post_clauses( $args );
$args(array) (required)
Query args.

WC_Admin_List_Table_Products::order_by_price_desc_post_clauses() code WC 10.3.3

public function order_by_price_desc_post_clauses( $args ) {
	$args['join']    = $this->append_product_sorting_table_join( $args['join'] );
	$args['orderby'] = ' wc_product_meta_lookup.max_price DESC, wc_product_meta_lookup.product_id DESC ';
	return $args;
}