Automattic\WooCommerce\Blocks\BlockTypes\ProductCollection
QueryBuilder::get_valid_query_vars
Return or initialize $valid_query_vars.
Method of the class: QueryBuilder{}
No Hooks.
Returns
Array.
Usage
// private - for code of main (parent) class only $result = $this->get_valid_query_vars();
QueryBuilder::get_valid_query_vars() QueryBuilder::get valid query vars code WC 10.3.6
private function get_valid_query_vars() {
if ( ! empty( $this->valid_query_vars ) ) {
return $this->valid_query_vars;
}
$valid_query_vars = array_keys( ( new WP_Query() )->fill_query_vars( array() ) );
$this->valid_query_vars = array_merge(
$valid_query_vars,
// fill_query_vars doesn't include these vars so we need to add them manually.
array(
'date_query',
'exact',
'ignore_sticky_posts',
'lazy_load_term_meta',
'meta_compare_key',
'meta_compare',
'meta_query',
'meta_type_key',
'meta_type',
'nopaging',
'offset',
'order',
'orderby',
'page',
'post_type',
'posts_per_page',
'suppress_filters',
'tax_query',
'isProductCollection',
'priceRange',
)
);
return $this->valid_query_vars;
}