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

Commit e6855f7

Browse files
kmanijakTarun Vijwani
authored andcommitted
Make a Single Product conversion enabled in Core, but keep the Product Archive behind experimental flag (#8907)
1 parent 872098c commit e6855f7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

assets/js/blocks/classic-template/archive-product.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
type BlockInstance,
88
} from '@wordpress/blocks';
99
import { isWpVersion } from '@woocommerce/settings';
10+
import { isExperimentalBuild } from '@woocommerce/block-settings';
1011
import { __, sprintf } from '@wordpress/i18n';
1112

1213
/**
@@ -74,7 +75,7 @@ const getBlockifiedTemplateWithTermDescription = (
7475
const isConversionPossible = () => {
7576
// Blockification is possible for the WP version 6.1 and above,
7677
// which are the versions the Products block supports.
77-
return isWpVersion( '6.1', '>=' );
78+
return isExperimentalBuild() && isWpVersion( '6.1', '>=' );
7879
};
7980

8081
const getDescriptionAllowingConversion = ( templateTitle: string ) =>

assets/js/blocks/classic-template/product-search-results.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
type InnerBlockTemplate,
99
} from '@wordpress/blocks';
1010
import { isWpVersion } from '@woocommerce/settings';
11+
import { isExperimentalBuild } from '@woocommerce/block-settings';
1112
import { __, sprintf } from '@wordpress/i18n';
1213

1314
/**
@@ -122,7 +123,7 @@ const getBlockifiedTemplate = ( inheritedAttributes: InheritedAttributes ) => {
122123
const isConversionPossible = () => {
123124
// Blockification is possible for the WP version 6.1 and above,
124125
// which are the versions the Products block supports.
125-
return isWpVersion( '6.1', '>=' );
126+
return isExperimentalBuild() && isWpVersion( '6.1', '>=' );
126127
};
127128

128129
const getDescriptionAllowingConversion = ( templateTitle: string ) =>

0 commit comments

Comments
 (0)