woocommerce/plugins/woocommerce-admin/client/tasks/fills/index.js

37 lines
973 B
JavaScript
Raw Normal View History

/**
* Internal dependencies
*/
import { isProductTaskExperimentTreatment } from './experimental-products/use-product-layout-experiment';
2022-05-16 03:59:40 +00:00
import { isImportProductExperiment } from './product-task-experiment';
import './PaymentGatewaySuggestions';
import './shipping';
import './Marketing';
import './appearance';
import './connect';
import './tax';
import './woocommerce-payments';
import './purchase';
2022-05-10 12:57:11 +00:00
const possiblyImportProductTaskExperiment = async () => {
2022-05-12 02:40:06 +00:00
const isExperiment = await isProductTaskExperimentTreatment();
if ( isExperiment ) {
2022-05-16 03:59:40 +00:00
if ( isImportProductExperiment() ) {
import( './experimental-import-products' );
} else {
import( './experimental-products' );
}
} else {
import( './products' );
}
};
if (
window.wcAdminFeatures &&
( window.wcAdminFeatures[ 'experimental-import-products-task' ] ||
window.wcAdminFeatures[ 'experimental-products-task' ] )
) {
2022-05-10 12:57:11 +00:00
possiblyImportProductTaskExperiment();
} else {
import( './products' );
}