2021-09-21 19:33:44 +00:00
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
2022-05-18 07:24:48 +00:00
|
|
|
import { isProductTaskExperimentTreatment } from './experimental-products/use-product-layout-experiment';
|
2022-05-16 03:59:40 +00:00
|
|
|
import { isImportProductExperiment } from './product-task-experiment';
|
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-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 ) {
|
2022-05-16 03:59:40 +00:00
|
|
|
if ( isImportProductExperiment() ) {
|
2022-05-16 02:49:49 +00:00
|
|
|
import( './experimental-import-products' );
|
|
|
|
} else {
|
|
|
|
import( './experimental-products' );
|
|
|
|
}
|
2022-05-10 08:58:02 +00:00
|
|
|
} else {
|
|
|
|
import( './products' );
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2022-04-26 05:28:15 +00:00
|
|
|
if (
|
2022-04-26 20:03:30 +00:00
|
|
|
window.wcAdminFeatures &&
|
2022-05-16 02:49:49 +00:00
|
|
|
( window.wcAdminFeatures[ 'experimental-import-products-task' ] ||
|
|
|
|
window.wcAdminFeatures[ 'experimental-products-task' ] )
|
2022-04-26 05:28:15 +00:00
|
|
|
) {
|
2022-05-10 12:57:11 +00:00
|
|
|
possiblyImportProductTaskExperiment();
|
2022-04-26 05:28:15 +00:00
|
|
|
} else {
|
|
|
|
import( './products' );
|
|
|
|
}
|
2022-06-28 05:53:03 +00:00
|
|
|
|
|
|
|
if (
|
|
|
|
window.wcAdminFeatures &&
|
|
|
|
window.wcAdminFeatures[ 'shipping-smart-defaults' ]
|
|
|
|
) {
|
|
|
|
import( './experimental-shipping-recommendation' );
|
|
|
|
}
|