2022-05-11 09:12:24 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
2022-05-12 02:40:06 +00:00
|
|
|
import { isProductTaskExperimentTreatment } from '@woocommerce/onboarding';
|
2022-05-11 09:12:24 +00:00
|
|
|
|
2021-09-21 19:33:44 +00:00
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
2022-04-26 20:03:30 +00:00
|
|
|
import { getAdminSetting } from '~/utils/admin-settings';
|
|
|
|
|
2021-09-21 19:33:44 +00:00
|
|
|
import './PaymentGatewaySuggestions';
|
|
|
|
import './shipping';
|
|
|
|
import './Marketing';
|
|
|
|
import './appearance';
|
|
|
|
import './connect';
|
|
|
|
import './tax';
|
|
|
|
import './woocommerce-payments';
|
|
|
|
import './purchase';
|
2022-04-26 05:28:15 +00:00
|
|
|
|
2022-04-26 20:03:30 +00:00
|
|
|
const onboardingData = getAdminSetting( 'onboarding' );
|
|
|
|
|
2022-05-10 12:57:11 +00:00
|
|
|
const possiblyImportProductTaskExperiment = async () => {
|
2022-05-12 02:40:06 +00:00
|
|
|
const isExperiment = await isProductTaskExperimentTreatment();
|
2022-05-10 08:58:02 +00:00
|
|
|
if ( isExperiment ) {
|
|
|
|
import( './experimental-products' );
|
|
|
|
} else {
|
|
|
|
import( './products' );
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2022-04-26 05:28:15 +00:00
|
|
|
if (
|
2022-04-26 20:03:30 +00:00
|
|
|
window.wcAdminFeatures &&
|
|
|
|
window.wcAdminFeatures[ 'experimental-import-products-task' ] &&
|
|
|
|
onboardingData?.profile?.selling_venues &&
|
|
|
|
onboardingData?.profile?.selling_venues !== 'no'
|
|
|
|
) {
|
|
|
|
import( './experimental-import-products' );
|
|
|
|
} else if (
|
2022-04-26 05:28:15 +00:00
|
|
|
window.wcAdminFeatures &&
|
|
|
|
window.wcAdminFeatures[ 'experimental-products-task' ]
|
|
|
|
) {
|
2022-05-10 12:57:11 +00:00
|
|
|
possiblyImportProductTaskExperiment();
|
2022-04-26 05:28:15 +00:00
|
|
|
} else {
|
|
|
|
import( './products' );
|
|
|
|
}
|