WC_Query::order_by_price_desc_post_clauses( array $args )

Handle numeric price sorting.


Description Description


Parameters Parameters

$args

(Required) Query args.


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/class-wc-query.php

	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;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.