Wrap product task import around experiment
This commit is contained in:
parent
e78f6e02be
commit
ebec562699
|
@ -22,7 +22,15 @@ const onboardingData = getAdminSetting( 'onboarding' );
|
||||||
const possiblyImportProductTaskExperiment = async () => {
|
const possiblyImportProductTaskExperiment = async () => {
|
||||||
const isExperiment = await isProductTaskExperimentTreatment();
|
const isExperiment = await isProductTaskExperimentTreatment();
|
||||||
if ( isExperiment ) {
|
if ( isExperiment ) {
|
||||||
|
if (
|
||||||
|
window.wcAdminFeatures[ 'experimental-import-products-task' ] &&
|
||||||
|
onboardingData?.profile?.selling_venues &&
|
||||||
|
onboardingData?.profile?.selling_venues !== 'no'
|
||||||
|
) {
|
||||||
|
import( './experimental-import-products' );
|
||||||
|
} else {
|
||||||
import( './experimental-products' );
|
import( './experimental-products' );
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
import( './products' );
|
import( './products' );
|
||||||
}
|
}
|
||||||
|
@ -30,14 +38,8 @@ const possiblyImportProductTaskExperiment = async () => {
|
||||||
|
|
||||||
if (
|
if (
|
||||||
window.wcAdminFeatures &&
|
window.wcAdminFeatures &&
|
||||||
window.wcAdminFeatures[ 'experimental-import-products-task' ] &&
|
( window.wcAdminFeatures[ 'experimental-import-products-task' ] ||
|
||||||
onboardingData?.profile?.selling_venues &&
|
window.wcAdminFeatures[ 'experimental-products-task' ] )
|
||||||
onboardingData?.profile?.selling_venues !== 'no'
|
|
||||||
) {
|
|
||||||
import( './experimental-import-products' );
|
|
||||||
} else if (
|
|
||||||
window.wcAdminFeatures &&
|
|
||||||
window.wcAdminFeatures[ 'experimental-products-task' ]
|
|
||||||
) {
|
) {
|
||||||
possiblyImportProductTaskExperiment();
|
possiblyImportProductTaskExperiment();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue