Product Collection - check the value before consuming it to avoid frontend warning (https://github.com/woocommerce/woocommerce-blocks/pull/10162)
This commit is contained in:
parent
45d994d47f
commit
d7d550f983
|
@ -174,7 +174,7 @@ class ProductCollection extends AbstractBlock {
|
|||
|
||||
$block_context_query = $block->context['query'];
|
||||
// phpcs:ignore WordPress.DB.SlowDBQuery
|
||||
$block_context_query['tax_query'] = $query['tax_query'];
|
||||
$block_context_query['tax_query'] = ! empty( $query['tax_query'] ) ? $query['tax_query'] : array();
|
||||
|
||||
return $this->get_final_frontend_query( $block_context_query, $page );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue