diff --git a/plugins/woocommerce-admin/client/customize-store/assembler-hub/block-editor-container.tsx b/plugins/woocommerce-admin/client/customize-store/assembler-hub/block-editor-container.tsx index 31896e0e27b5..6914b99416bd 100644 --- a/plugins/woocommerce-admin/client/customize-store/assembler-hub/block-editor-container.tsx +++ b/plugins/woocommerce-admin/client/customize-store/assembler-hub/block-editor-container.tsx @@ -16,6 +16,8 @@ import { useQuery } from '@woocommerce/navigation'; // @ts-expect-error No types for this exist yet. import useSiteEditorSettings from '@wordpress/edit-site/build-module/components/block-editor/use-site-editor-settings'; import { useCallback, useContext, useMemo } from '@wordpress/element'; +// @ts-expect-error No types for this exist yet. +import { store as editSiteStore } from '@wordpress/edit-site/build-module/store'; /** * Internal dependencies @@ -78,8 +80,18 @@ export const BlockEditorContainer = () => { [] ); + // This is necessary to avoid this issue: https://github.com/woocommerce/woocommerce/issues/45593 + // Related PR: https://github.com/woocommerce/woocommerce/pull/45600 + const { templateType } = useSelect( ( select ) => { + const { getEditedPostType } = unlock( select( editSiteStore ) ); + + return { + templateType: getEditedPostType(), + }; + }, [] ); + const [ blocks, , onChange ] = useEditorBlocks( - 'wp_template', + templateType, currentTemplate?.id ?? '' ); diff --git a/plugins/woocommerce/changelog/45600-45593-cys-on-core-product-rating-block-not-rendering b/plugins/woocommerce/changelog/45600-45593-cys-on-core-product-rating-block-not-rendering new file mode 100644 index 000000000000..27392a715984 --- /dev/null +++ b/plugins/woocommerce/changelog/45600-45593-cys-on-core-product-rating-block-not-rendering @@ -0,0 +1,4 @@ +Significance: minor +Type: fix + +CYS - Core: fix Product Rating block renders \ No newline at end of file