diff --git a/assets/js/blocks/product-gallery/edit.tsx b/assets/js/blocks/product-gallery/edit.tsx
index 333ba96e9a8..9afadc3da2e 100644
--- a/assets/js/blocks/product-gallery/edit.tsx
+++ b/assets/js/blocks/product-gallery/edit.tsx
@@ -44,13 +44,14 @@ export const Edit = ( {
}: BlockEditProps< BlockAttributes > ) => {
const blockProps = useBlockProps();
+ // Update the Group block type when the thumbnailsPosition attribute changes.
+ updateGroupBlockType( attributes, clientId );
+
useEffect( () => {
setAttributes( {
...attributes,
productGalleryClientId: clientId,
} );
- // Update the Group block type when the thumbnailsPosition attribute changes.
- updateGroupBlockType( attributes, clientId );
// Move the Thumbnails block to the correct above or below the Large Image based on the thumbnailsPosition attribute.
moveInnerBlocksToPosition( attributes, clientId );
}, [ setAttributes, attributes, clientId ] );
diff --git a/assets/js/blocks/product-gallery/inner-blocks/product-gallery-thumbnails/block-settings/index.tsx b/assets/js/blocks/product-gallery/inner-blocks/product-gallery-thumbnails/block-settings/index.tsx
index 20ab03e0ac6..6cf7a5c4188 100644
--- a/assets/js/blocks/product-gallery/inner-blocks/product-gallery-thumbnails/block-settings/index.tsx
+++ b/assets/js/blocks/product-gallery/inner-blocks/product-gallery-thumbnails/block-settings/index.tsx
@@ -33,19 +33,19 @@ import { ThumbnailsPosition } from '../constants';
import type { ThumbnailsSettingProps } from '../../../types';
const positionHelp: Record< ThumbnailsPosition, string > = {
- [ ThumbnailsPosition.Off ]: __(
+ [ ThumbnailsPosition.OFF ]: __(
'No thumbnails will be displayed.',
'woo-gutenberg-products-block'
),
- [ ThumbnailsPosition.Left ]: __(
+ [ ThumbnailsPosition.LEFT ]: __(
'A strip of small images will appear to the left of the main gallery image.',
'woo-gutenberg-products-block'
),
- [ ThumbnailsPosition.Bottom ]: __(
+ [ ThumbnailsPosition.BOTTOM ]: __(
'A strip of small images will appear below the main gallery image.',
'woo-gutenberg-products-block'
),
- [ ThumbnailsPosition.Right ]: __(
+ [ ThumbnailsPosition.RIGHT ]: __(
'A strip of small images will appear to the right of the main gallery image.',
'woo-gutenberg-products-block'
),
@@ -81,17 +81,17 @@ export const BlockSettings = ( { context }: ThumbnailsSettingProps ) => {
}
>
}
/>
{
}
/>
{
}
/>
- { context.thumbnailsPosition !== ThumbnailsPosition.Off && (
+ { context.thumbnailsPosition !== ThumbnailsPosition.OFF && (
{
return (
<>
- { context.thumbnailsPosition !== ThumbnailsPosition.Off && (
+ { context.thumbnailsPosition !== ThumbnailsPosition.OFF && (
{ [
...Array(