WC_Admin_List_Table_Products::remove_ordering_args()publicWC 1.0

Remove ordering queries.

Method of the class: WC_Admin_List_Table_Products{}

No Hooks.

Return

Array.

Usage

$WC_Admin_List_Table_Products = new WC_Admin_List_Table_Products();
$WC_Admin_List_Table_Products->remove_ordering_args( $posts );
$posts(array)
Posts array, keeping this for backwards compatibility defaulting to empty array.
Default: array()

WC_Admin_List_Table_Products::remove_ordering_args() code WC 8.6.1

public function remove_ordering_args( $posts = array() ) {
	remove_filter( 'posts_clauses', array( $this, 'order_by_price_asc_post_clauses' ) );
	remove_filter( 'posts_clauses', array( $this, 'order_by_price_desc_post_clauses' ) );
	remove_filter( 'posts_clauses', array( $this, 'order_by_sku_asc_post_clauses' ) );
	remove_filter( 'posts_clauses', array( $this, 'order_by_sku_desc_post_clauses' ) );
	remove_filter( 'posts_clauses', array( $this, 'filter_downloadable_post_clauses' ) );
	remove_filter( 'posts_clauses', array( $this, 'filter_virtual_post_clauses' ) );
	remove_filter( 'posts_clauses', array( $this, 'filter_stock_status_post_clauses' ) );
	return $posts; // Keeping this here for backward compatibility.
}