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

44 lines
1.1 KiB
JavaScript

/**
* Internal dependencies
*/
import { isProductTaskExperimentTreatment } from './experimental-products/use-product-layout-experiment';
import { isImportProductExperiment } from './product-task-experiment';
import './PaymentGatewaySuggestions';
import './shipping';
import './Marketing';
import './appearance';
import './connect';
import './tax';
import './woocommerce-payments';
import './purchase';
const possiblyImportProductTaskExperiment = async () => {
const isExperiment = await isProductTaskExperimentTreatment();
if ( isExperiment ) {
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' ] )
) {
possiblyImportProductTaskExperiment();
} else {
import( './products' );
}
if (
window.wcAdminFeatures &&
window.wcAdminFeatures[ 'shipping-smart-defaults' ]
) {
import( './experimental-shipping-recommendation' );
}