Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Remove feature flag from Element variations (#8297)
Browse files Browse the repository at this point in the history
Removes feature flag from:

* Product Summary
* Product Template
* Product Title
  • Loading branch information
sunyatasattva authored Jan 26, 2023
1 parent 2735c53 commit ded8728
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 30 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* External dependencies
*/
import { isFeaturePluginBuild } from '@woocommerce/block-settings';
import { Icon } from '@wordpress/components';
import {
BLOCK_DESCRIPTION,
Expand All @@ -17,11 +16,9 @@ import { registerElementVariation } from './utils';
export const CORE_NAME = 'core/post-excerpt';
export const VARIATION_NAME = 'woocommerce/product-query/product-summary';

if ( isFeaturePluginBuild() ) {
registerElementVariation( CORE_NAME, {
blockDescription: BLOCK_DESCRIPTION,
blockIcon: <Icon icon={ page } />,
blockTitle: BLOCK_TITLE,
variationName: VARIATION_NAME,
} );
}
registerElementVariation( CORE_NAME, {
blockDescription: BLOCK_DESCRIPTION,
blockIcon: <Icon icon={ page } />,
blockTitle: BLOCK_TITLE,
variationName: VARIATION_NAME,
} );
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* External dependencies
*/
import { isFeaturePluginBuild } from '@woocommerce/block-settings';
import { Icon } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { layout } from '@wordpress/icons';
Expand All @@ -14,14 +13,12 @@ import { registerElementVariation } from './utils';
export const CORE_NAME = 'core/post-template';
export const VARIATION_NAME = 'woocommerce/product-query/product-template';

if ( isFeaturePluginBuild() ) {
registerElementVariation( CORE_NAME, {
blockDescription: __(
'Contains the block elements used to render a product, like its name, featured image, rating, and more.',
'woo-gutenberg-products-block'
),
blockIcon: <Icon icon={ layout } />,
blockTitle: __( 'Product template', 'woo-gutenberg-products-block' ),
variationName: VARIATION_NAME,
} );
}
registerElementVariation( CORE_NAME, {
blockDescription: __(
'Contains the block elements used to render a product, like its name, featured image, rating, and more.',
'woo-gutenberg-products-block'
),
blockIcon: <Icon icon={ layout } />,
blockTitle: __( 'Product template', 'woo-gutenberg-products-block' ),
variationName: VARIATION_NAME,
} );
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* External dependencies
*/
import { isFeaturePluginBuild } from '@woocommerce/block-settings';
import { Icon } from '@wordpress/components';
import {
BLOCK_DESCRIPTION,
Expand All @@ -17,11 +16,9 @@ import { registerElementVariation } from './utils';
export const CORE_NAME = 'core/post-title';
export const VARIATION_NAME = 'woocommerce/product-query/product-title';

if ( isFeaturePluginBuild() ) {
registerElementVariation( CORE_NAME, {
blockDescription: BLOCK_DESCRIPTION,
blockIcon: <Icon icon={ heading } />,
blockTitle: BLOCK_TITLE,
variationName: VARIATION_NAME,
} );
}
registerElementVariation( CORE_NAME, {
blockDescription: BLOCK_DESCRIPTION,
blockIcon: <Icon icon={ heading } />,
blockTitle: BLOCK_TITLE,
variationName: VARIATION_NAME,
} );

0 comments on commit ded8728

Please sign in to comment.