Place Printful behind a feature flag (#49104)

* Add printful feature flag

* Place printful placement behind feature flag

* Add changelog
This commit is contained in:
Adrian Duffell 2024-07-04 01:01:37 +08:00 committed by GitHub
parent b36083403d
commit 9af58923de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 16 additions and 7 deletions

View File

@ -132,10 +132,12 @@ export const SETUP_TASKLIST_PRODUCT_TYPES_FILTER =
export const SETUP_TASKLIST_PRODUCTS_AFTER_FILTER =
'woocommerce_admin_task_products_after';
addFilter(
if ( window.wcAdminFeatures && window.wcAdminFeatures.printful === true ) {
addFilter(
SETUP_TASKLIST_PRODUCTS_AFTER_FILTER,
'woocommerce/task-lists/products-sponsored-placement',
( products ) => {
return [ ...products, PrintfulAdvertProductPlacement ];
}
);
);
}

View File

@ -43,6 +43,7 @@ declare global {
'onboarding-tasks': boolean;
'payment-gateway-suggestions': boolean;
'pattern-toolkit-full-composability': boolean;
printful: boolean;
'product-pre-publish-modal': boolean;
'product-custom-fields': boolean;
'remote-inbox-notifications': boolean;

View File

@ -0,0 +1,4 @@
Significance: minor
Type: update
Add feature flag for Printful placement

View File

@ -25,6 +25,7 @@
"remote-inbox-notifications": true,
"remote-free-extensions": true,
"payment-gateway-suggestions": true,
"printful": false,
"settings": false,
"shipping-label-banner": true,
"subscriptions": true,

View File

@ -23,6 +23,7 @@
"payment-gateway-suggestions": true,
"product-pre-publish-modal": false,
"product-custom-fields": true,
"printful": false,
"remote-inbox-notifications": true,
"remote-free-extensions": true,
"settings": false,