From 2f9b04b20f43f87b964ae6500185dfc5d44c45ce Mon Sep 17 00:00:00 2001 From: okmttdhr Date: Wed, 29 Nov 2023 10:43:54 +0900 Subject: [PATCH] Add a comment about required plan --- .../hooks/use-can-preview-but-need-upgrade.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/wpcom-block-editor/src/wpcom/features/live-preview/hooks/use-can-preview-but-need-upgrade.ts b/apps/wpcom-block-editor/src/wpcom/features/live-preview/hooks/use-can-preview-but-need-upgrade.ts index 4fd9e455efe88f..6f37b2b74b57de 100644 --- a/apps/wpcom-block-editor/src/wpcom/features/live-preview/hooks/use-can-preview-but-need-upgrade.ts +++ b/apps/wpcom-block-editor/src/wpcom/features/live-preview/hooks/use-can-preview-but-need-upgrade.ts @@ -117,8 +117,13 @@ export const useCanPreviewButNeedUpgrade = ( { }; const link = previewingTheme.type === WOOCOMMERCE_THEME - ? generateCheckoutUrl( PLAN_BUSINESS ) // For a WooCommerce theme, the users should have the Business plan or higher. - : generateCheckoutUrl( PLAN_PREMIUM ); // For a Premium theme, the users should have the Premium plan or higher. + ? /** + * For a WooCommerce theme, the users should have the Business plan or higher, + * AND the WooCommerce plugin has to be installed. + */ + generateCheckoutUrl( PLAN_BUSINESS ) + : // For a Premium theme, the users should have the Premium plan or higher. + generateCheckoutUrl( PLAN_PREMIUM ); window.location.href = link; // TODO: Add the track event.