From 2583289197a9bc1f3051ba5e4c8b407fceab857f Mon Sep 17 00:00:00 2001 From: Adrian Duffell <9312929+adrianduffell@users.noreply.github.com> Date: Fri, 7 Jun 2024 13:49:55 +0800 Subject: [PATCH] Enable Launch Your Store feature flag in 9.1 (#48244) * Revert "Disable Launch Your Store feature flag in 9.0 (#48231)" This reverts commit 76d2b205e51311dac14fe83b96eaf7c96ce44596. * Re-add the previous changelog * Update version number in db update * Add changelog --- plugins/woocommerce/changelog/update-lys-feature-flag-on | 4 ++++ plugins/woocommerce/client/admin/config/core.json | 2 +- plugins/woocommerce/includes/class-wc-install.php | 3 +++ plugins/woocommerce/includes/wc-update-functions.php | 7 +++++++ .../tests/e2e-pw/tests/merchant/launch-your-store.spec.js | 2 +- .../tests/e2e-pw/tests/shopper/launch-your-store.spec.js | 2 +- 6 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 plugins/woocommerce/changelog/update-lys-feature-flag-on diff --git a/plugins/woocommerce/changelog/update-lys-feature-flag-on b/plugins/woocommerce/changelog/update-lys-feature-flag-on new file mode 100644 index 00000000000..50fc42ea16a --- /dev/null +++ b/plugins/woocommerce/changelog/update-lys-feature-flag-on @@ -0,0 +1,4 @@ +Significance: minor +Type: update + +Toggle LYS feature flag on for 9.1 diff --git a/plugins/woocommerce/client/admin/config/core.json b/plugins/woocommerce/client/admin/config/core.json index ef0ae6efa13..44cc7bfc98f 100644 --- a/plugins/woocommerce/client/admin/config/core.json +++ b/plugins/woocommerce/client/admin/config/core.json @@ -34,7 +34,7 @@ "wc-pay-promotion": true, "wc-pay-welcome-page": true, "async-product-editor-category-field": false, - "launch-your-store": false, + "launch-your-store": true, "product-editor-template-system": false } } diff --git a/plugins/woocommerce/includes/class-wc-install.php b/plugins/woocommerce/includes/class-wc-install.php index bcc10819ac6..7a6a437c23b 100644 --- a/plugins/woocommerce/includes/class-wc-install.php +++ b/plugins/woocommerce/includes/class-wc-install.php @@ -255,6 +255,9 @@ class WC_Install { '8.9.1' => array( 'wc_update_891_create_plugin_autoinstall_history_option', ), + '9.1.0' => array( + 'wc_update_910_add_launch_your_store_tour_option', + ), ); /** diff --git a/plugins/woocommerce/includes/wc-update-functions.php b/plugins/woocommerce/includes/wc-update-functions.php index 9c177fef81a..5435ab14218 100644 --- a/plugins/woocommerce/includes/wc-update-functions.php +++ b/plugins/woocommerce/includes/wc-update-functions.php @@ -2724,3 +2724,10 @@ function wc_update_891_create_plugin_autoinstall_history_option() { } } } + +/** + * Add woocommerce_show_lys_tour. + */ +function wc_update_910_add_launch_your_store_tour_option() { + add_option( 'woocommerce_show_lys_tour', 'yes' ); +} diff --git a/plugins/woocommerce/tests/e2e-pw/tests/merchant/launch-your-store.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/merchant/launch-your-store.spec.js index 1f77af2057d..d6b6ad5e20e 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/merchant/launch-your-store.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/merchant/launch-your-store.spec.js @@ -2,7 +2,7 @@ const { test, expect, request } = require( '@playwright/test' ); const { setOption } = require( '../../utils/options' ); const wcApi = require( '@woocommerce/woocommerce-rest-api' ).default; -test.describe.skip( 'Launch Your Store - logged in', () => { +test.describe( 'Launch Your Store - logged in', () => { test.use( { storageState: process.env.ADMINSTATE } ); test.beforeEach( async ( { baseURL } ) => { diff --git a/plugins/woocommerce/tests/e2e-pw/tests/shopper/launch-your-store.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/shopper/launch-your-store.spec.js index 6eca0bced11..e8c932759f5 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/shopper/launch-your-store.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/shopper/launch-your-store.spec.js @@ -1,7 +1,7 @@ const { test, expect, request } = require( '@playwright/test' ); const { setOption } = require( '../../utils/options' ); -test.describe.skip( 'Launch Your Store front end - logged out', () => { +test.describe( 'Launch Your Store front end - logged out', () => { test.afterAll( async ( { baseURL } ) => { try { await setOption(