Merge pull request #32774 from woocommerce/add/32772-exp-product-tasks-feature-flag
Add experimental product task feature flag & experimental-products component
This commit is contained in:
commit
61464e1af6
|
@ -0,0 +1,20 @@
|
|||
/**
|
||||
* External dependencies
|
||||
*/
|
||||
import { WooOnboardingTask } from '@woocommerce/onboarding';
|
||||
import { registerPlugin } from '@wordpress/plugins';
|
||||
|
||||
const Products = () => {
|
||||
return <h1>Experimental products</h1>;
|
||||
};
|
||||
|
||||
registerPlugin( 'wc-admin-onboarding-task-products', {
|
||||
// @ts-expect-error 'scope' does exist. @types/wordpress__plugins is outdated.
|
||||
scope: 'woocommerce-tasks',
|
||||
render: () => (
|
||||
// @ts-expect-error WooOnboardingTask is a pure JS component.
|
||||
<WooOnboardingTask id="products">
|
||||
<Products />
|
||||
</WooOnboardingTask>
|
||||
),
|
||||
} );
|
|
@ -4,9 +4,17 @@
|
|||
import './PaymentGatewaySuggestions';
|
||||
import './shipping';
|
||||
import './Marketing';
|
||||
import './products';
|
||||
import './appearance';
|
||||
import './connect';
|
||||
import './tax';
|
||||
import './woocommerce-payments';
|
||||
import './purchase';
|
||||
|
||||
if (
|
||||
window.wcAdminFeatures &&
|
||||
window.wcAdminFeatures[ 'experimental-products-task' ]
|
||||
) {
|
||||
import( './experimental-products' );
|
||||
} else {
|
||||
import( './products' );
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ declare global {
|
|||
analytics: boolean;
|
||||
coupons: boolean;
|
||||
'customer-effort-score-tracks': boolean;
|
||||
'experimental-products-task': boolean;
|
||||
homescreen: boolean;
|
||||
marketing: boolean;
|
||||
'minified-js': boolean;
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: patch
|
||||
Type: add
|
||||
|
||||
Add experimental product task feature flag & experimental-products component
|
|
@ -4,13 +4,14 @@
|
|||
"analytics": true,
|
||||
"coupons": true,
|
||||
"customer-effort-score-tracks": true,
|
||||
"experimental-products-task": false,
|
||||
"homescreen": true,
|
||||
"marketing": true,
|
||||
"minified-js": false,
|
||||
"mobile-app-banner": true,
|
||||
"navigation": true,
|
||||
"onboarding": true,
|
||||
"onboarding-tasks": true,
|
||||
"onboarding-tasks": true,
|
||||
"remote-inbox-notifications": true,
|
||||
"remote-free-extensions": true,
|
||||
"payment-gateway-suggestions": true,
|
||||
|
|
|
@ -4,13 +4,14 @@
|
|||
"analytics": true,
|
||||
"coupons": true,
|
||||
"customer-effort-score-tracks": true,
|
||||
"experimental-products-task": false,
|
||||
"homescreen": true,
|
||||
"marketing": true,
|
||||
"minified-js": true,
|
||||
"mobile-app-banner": true,
|
||||
"navigation": true,
|
||||
"onboarding": true,
|
||||
"onboarding-tasks": true,
|
||||
"onboarding-tasks": true,
|
||||
"payment-gateway-suggestions": true,
|
||||
"remote-inbox-notifications": true,
|
||||
"remote-free-extensions": true,
|
||||
|
|
Loading…
Reference in New Issue