Product Gallery > Prevent error when "layout" is missing in block attributes (https://github.com/woocommerce/woocommerce-blocks/pull/10784)

This commit is contained in:
Alexandre Lara 2023-09-01 19:41:41 -03:00 committed by GitHub
parent 3e581e0372
commit bda42f936c
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ class ProductGalleryLargeImageNextPrevious extends AbstractBlock {
$this->get_class_suffix( $context ) $this->get_class_suffix( $context )
); );
$alignment_class = $attributes['layout']['verticalAlignment'] ? 'is-vertically-aligned-' . $attributes['layout']['verticalAlignment'] : ''; $alignment_class = isset( $attributes['layout']['verticalAlignment'] ) ? 'is-vertically-aligned-' . $attributes['layout']['verticalAlignment'] : '';
$position_class = 'wc-block-product-gallery-large-image-next-previous--' . $this->get_class_suffix( $context ); $position_class = 'wc-block-product-gallery-large-image-next-previous--' . $this->get_class_suffix( $context );
return strtr( return strtr(