WC_Admin_List_Table_Products::remove_ordering_args()publicWC 1.0

Remove ordering queries.

Метод класса: WC_Admin_List_Table_Products{}

Хуков нет.

Возвращает

Массив.

Использование

$WC_Admin_List_Table_Products = new WC_Admin_List_Table_Products();
$WC_Admin_List_Table_Products->remove_ordering_args( $posts );
$posts(массив)
Posts array, keeping this for backwards compatibility defaulting to empty array.
По умолчанию: array()

Код WC_Admin_List_Table_Products::remove_ordering_args() WC 8.7.0

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