diff --git a/src/BlockTypes/ProductTemplate.php b/src/BlockTypes/ProductTemplate.php index c5885077917..7c7b06acd90 100644 --- a/src/BlockTypes/ProductTemplate.php +++ b/src/BlockTypes/ProductTemplate.php @@ -61,7 +61,7 @@ protected function render( $attributes, $content, $block ) { $classnames = ''; if ( isset( $block->context['displayLayout'] ) && isset( $block->context['query'] ) ) { if ( isset( $block->context['displayLayout']['type'] ) && 'flex' === $block->context['displayLayout']['type'] ) { - if ( $block->context['displayLayout']['shrinkColumns'] ) { + if ( isset( $block->context['displayLayout']['shrinkColumns'] ) && $block->context['displayLayout']['shrinkColumns'] ) { $classnames = "wc-block-product-template__responsive columns-{$block->context['displayLayout']['columns']}"; } else { $classnames = "is-flex-container columns-{$block->context['displayLayout']['columns']}";