Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
add missing query vars
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhtungdu committed Nov 24, 2022
1 parent c492ce6 commit c8e315c
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/BlockTypes/ProductQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,27 @@ private function merge_queries( ...$queries ) {
$valid_query_vars = array_keys( ( new WP_Query() )->fill_query_vars( array() ) );
$valid_query_vars = array_merge(
$valid_query_vars,
array( 'meta_query', 'tax_query', 'date_query' )
// 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',
)
);

$merged_query = array_reduce(
Expand Down

0 comments on commit c8e315c

Please sign in to comment.