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

Commit

Permalink
Guard attribute height isset
Browse files Browse the repository at this point in the history
  • Loading branch information
sunyatasattva committed Apr 11, 2022
1 parent 118b306 commit 47aeefb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BlockTypes/FeaturedProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected function render( $attributes, $content ) {
}
$attributes = wp_parse_args( $attributes, $this->defaults );

$attributes['height'] = $attributes['height'] ? $attributes['height'] : wc_get_theme_support( 'featured_block::default_height', 500 );
$attributes['height'] = isset( $attributes['height'] ) ? $attributes['height'] : wc_get_theme_support( 'featured_block::default_height', 500 );

$title = sprintf(
'<h2 class="wc-block-featured-product__title">%s</h2>',
Expand Down

0 comments on commit 47aeefb

Please sign in to comment.