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:
Karol Manijak 2023-07-11 14:40:15 +02:00 committed by GitHub
parent 45d994d47f
commit d7d550f983
1 changed files with 1 additions and 1 deletions

View File

@ -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 );
}