From b874995fa0eccc95b787792b90b8b61802a18d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Thu, 23 Mar 2023 15:36:46 +0100 Subject: [PATCH] Fix border styles not visible in the editor in Featured Product and Featured Category blocks in core (#8838) --- assets/js/base/hooks/use-border-props.ts | 8 -------- assets/js/base/hooks/use-color-props.ts | 8 -------- 2 files changed, 16 deletions(-) diff --git a/assets/js/base/hooks/use-border-props.ts b/assets/js/base/hooks/use-border-props.ts index efcf467eb32..6e3a03c8064 100644 --- a/assets/js/base/hooks/use-border-props.ts +++ b/assets/js/base/hooks/use-border-props.ts @@ -3,7 +3,6 @@ * External dependencies */ import { __experimentalUseBorderProps } from '@wordpress/block-editor'; -import { isFeaturePluginBuild } from '@woocommerce/block-settings'; import { isObject } from '@woocommerce/types'; import { parseStyle } from '@woocommerce/base-utils'; @@ -20,13 +19,6 @@ type WithStyle = { export const useBorderProps = ( attributes: unknown ): WithStyle & WithClass => { - if ( ! isFeaturePluginBuild() ) { - return { - className: '', - style: {}, - }; - } - const attributesObject = isObject( attributes ) ? attributes : {}; const style = parseStyle( attributesObject.style ); diff --git a/assets/js/base/hooks/use-color-props.ts b/assets/js/base/hooks/use-color-props.ts index 3254b7f2f01..ee25994b3c4 100644 --- a/assets/js/base/hooks/use-color-props.ts +++ b/assets/js/base/hooks/use-color-props.ts @@ -3,7 +3,6 @@ * External dependencies */ import { __experimentalUseColorProps } from '@wordpress/block-editor'; -import { isFeaturePluginBuild } from '@woocommerce/block-settings'; import { isObject } from '@woocommerce/types'; import { parseStyle } from '@woocommerce/base-utils'; @@ -18,13 +17,6 @@ type WithStyle = { // @todo The @wordpress/block-editor dependency should never be used on the frontend of the store due to excessive side and its dependency on @wordpress/components // @see https://github.com/woocommerce/woocommerce-blocks/issues/8071 export const useColorProps = ( attributes: unknown ): WithStyle & WithClass => { - if ( ! isFeaturePluginBuild() ) { - return { - className: '', - style: {}, - }; - } - const attributesObject = isObject( attributes ) ? attributes : {}; const style = parseStyle( attributesObject.style );