From 517da044c751a51912b217ae584ef9a5db5e2963 Mon Sep 17 00:00:00 2001 From: Luigi Date: Wed, 21 Dec 2022 16:27:39 +0100 Subject: [PATCH] Enable Product SKU and Product Stock Indicator in Core --- assets/js/atomic/blocks/product-elements/sku/index.ts | 4 ++-- .../atomic/blocks/product-elements/stock-indicator/index.ts | 4 ++-- .../blocks/feature-flags-and-experimental-interfaces.md | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/assets/js/atomic/blocks/product-elements/sku/index.ts b/assets/js/atomic/blocks/product-elements/sku/index.ts index db0adaadc2c..1e1d1cdc542 100644 --- a/assets/js/atomic/blocks/product-elements/sku/index.ts +++ b/assets/js/atomic/blocks/product-elements/sku/index.ts @@ -1,7 +1,7 @@ /** * External dependencies */ -import { registerFeaturePluginBlockType } from '@woocommerce/block-settings'; +import { registerBlockType } from '@wordpress/blocks'; import type { BlockConfiguration } from '@wordpress/blocks'; /** @@ -31,7 +31,7 @@ const blockConfig: BlockConfiguration = { edit, }; -registerFeaturePluginBlockType( 'woocommerce/product-sku', { +registerBlockType( 'woocommerce/product-sku', { ...sharedConfig, ...blockConfig, } ); diff --git a/assets/js/atomic/blocks/product-elements/stock-indicator/index.ts b/assets/js/atomic/blocks/product-elements/stock-indicator/index.ts index 32ea7206470..f65b3161419 100644 --- a/assets/js/atomic/blocks/product-elements/stock-indicator/index.ts +++ b/assets/js/atomic/blocks/product-elements/stock-indicator/index.ts @@ -1,7 +1,7 @@ /** * External dependencies */ -import { registerFeaturePluginBlockType } from '@woocommerce/block-settings'; +import { registerBlockType } from '@wordpress/blocks'; import type { BlockConfiguration } from '@wordpress/blocks'; /** @@ -35,6 +35,6 @@ const blockConfig: BlockConfiguration = { ], }; -registerFeaturePluginBlockType( 'woocommerce/product-stock-indicator', { +registerBlockType( 'woocommerce/product-stock-indicator', { ...blockConfig, } ); diff --git a/docs/internal-developers/blocks/feature-flags-and-experimental-interfaces.md b/docs/internal-developers/blocks/feature-flags-and-experimental-interfaces.md index d1672c5c664..cf5cb4d3d37 100644 --- a/docs/internal-developers/blocks/feature-flags-and-experimental-interfaces.md +++ b/docs/internal-developers/blocks/feature-flags-and-experimental-interfaces.md @@ -33,8 +33,6 @@ The majority of our feature flagging is blocks, this is a list of them: ### Feature plugin flag -- ⚛️ Product SKU ([JS flag](https://github.com/woocommerce/woocommerce-blocks/blob/4c18b1ff8511ede063e2082316a68eddc8231b51/assets/js/atomic/blocks/product-elements/sku/index.ts#L34)). -- ⚛️ Product stock indicator ([JS flag](https://github.com/woocommerce/woocommerce-blocks/blob/4c18b1ff8511ede063e2082316a68eddc8231b51/assets/js/atomic/blocks/product-elements/stock-indicator/index.ts#L38)). ### Experimental flag