From dd8f9686fb9c8570cc45eda6102f16d01e324b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20P=C3=A9rez=20Pellicer?= <5908855+puntope@users.noreply.github.com> Date: Mon, 22 Jul 2024 18:59:43 +0400 Subject: [PATCH] Rename Google Listings and Ads with Google for WooCommerce (#47614) * Rename Google Listings and Ads with Google for WooCommerce * Revert change regarding changelog * Add changelogs * Add changefile(s) from automation for the following project(s): @woocommerce/data, packages/php/remote-specs-validation, woocommerce * Lint * Lint * Lint * Rename Google Listings and Ads with Google for WooCommerce * Lint * Lint * Tweak updated tests * Add changefile(s) from automation for the following project(s): @woocommerce/data, packages/php/remote-specs-validation, woocommerce * Lint * Fix flaky tests --------- Co-authored-by: github-actions --- .../47614-tweak-google-extension-rename | 4 ++ .../changelog/tweak-google-extension-rename | 4 ++ packages/js/data/src/plugins/constants.ts | 2 +- .../47614-tweak-google-extension-rename | 4 ++ .../changelog/tweak-google-extension-rename | 4 ++ .../tests/fixtures/obw-free-extensions.json | 10 ++--- .../client/activity-panel/panels/help.js | 2 +- .../CreateNewCampaignModal.test.tsx | 2 +- .../Campaigns/Campaigns.test.tsx | 4 +- .../DiscoverTools/DiscoverTools.test.tsx | 4 +- .../47614-tweak-google-extension-rename | 4 ++ .../changelog/tweak-google-extension-rename | 4 ++ .../DefaultMarketingRecommendations.php | 2 +- .../DefaultFreeExtensions.php | 8 ++-- .../activate-and-setup/core-profiler.spec.js | 42 +++++++++++-------- .../src/lib/__tests__/fixtures/diff.txt | 2 +- 16 files changed, 67 insertions(+), 35 deletions(-) create mode 100644 packages/js/data/changelog/47614-tweak-google-extension-rename create mode 100644 packages/js/data/changelog/tweak-google-extension-rename create mode 100644 packages/php/remote-specs-validation/changelog/47614-tweak-google-extension-rename create mode 100644 packages/php/remote-specs-validation/changelog/tweak-google-extension-rename create mode 100644 plugins/woocommerce/changelog/47614-tweak-google-extension-rename create mode 100644 plugins/woocommerce/changelog/tweak-google-extension-rename diff --git a/packages/js/data/changelog/47614-tweak-google-extension-rename b/packages/js/data/changelog/47614-tweak-google-extension-rename new file mode 100644 index 00000000000..4ac5ec3e8d9 --- /dev/null +++ b/packages/js/data/changelog/47614-tweak-google-extension-rename @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak + +Rename Google Listings and Ads with Google for WooCommerce #### Comment \ No newline at end of file diff --git a/packages/js/data/changelog/tweak-google-extension-rename b/packages/js/data/changelog/tweak-google-extension-rename new file mode 100644 index 00000000000..8a85377cbb9 --- /dev/null +++ b/packages/js/data/changelog/tweak-google-extension-rename @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak + +Rename Google Listings and Ads with Google for WooCommerce diff --git a/packages/js/data/src/plugins/constants.ts b/packages/js/data/src/plugins/constants.ts index 2fe65fad645..5c5479927a9 100644 --- a/packages/js/data/src/plugins/constants.ts +++ b/packages/js/data/src/plugins/constants.ts @@ -52,7 +52,7 @@ export const pluginNames = { 'Mercado Pago payments for WooCommerce', 'woocommerce' ), - 'google-listings-and-ads': __( 'Google Listings and Ads', 'woocommerce' ), + 'google-listings-and-ads': __( 'Google for WooCommerce', 'woocommerce' ), 'woo-razorpay': __( 'Razorpay', 'woocommerce' ), mailpoet: __( 'MailPoet', 'woocommerce' ), 'pinterest-for-woocommerce': __( diff --git a/packages/php/remote-specs-validation/changelog/47614-tweak-google-extension-rename b/packages/php/remote-specs-validation/changelog/47614-tweak-google-extension-rename new file mode 100644 index 00000000000..4ac5ec3e8d9 --- /dev/null +++ b/packages/php/remote-specs-validation/changelog/47614-tweak-google-extension-rename @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak + +Rename Google Listings and Ads with Google for WooCommerce #### Comment \ No newline at end of file diff --git a/packages/php/remote-specs-validation/changelog/tweak-google-extension-rename b/packages/php/remote-specs-validation/changelog/tweak-google-extension-rename new file mode 100644 index 00000000000..8a85377cbb9 --- /dev/null +++ b/packages/php/remote-specs-validation/changelog/tweak-google-extension-rename @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak + +Rename Google Listings and Ads with Google for WooCommerce diff --git a/packages/php/remote-specs-validation/tests/fixtures/obw-free-extensions.json b/packages/php/remote-specs-validation/tests/fixtures/obw-free-extensions.json index 4147a07ab43..416dc84228e 100644 --- a/packages/php/remote-specs-validation/tests/fixtures/obw-free-extensions.json +++ b/packages/php/remote-specs-validation/tests/fixtures/obw-free-extensions.json @@ -425,8 +425,8 @@ "key": "mailpoet" }, { - "name": "Google Listings & Ads", - "description": "Drive sales with Google Listings and Ads", + "name": "Google for WooCommerce", + "description": "Drive sales with Google for WooCommerce", "image_url": "https://woocommerce.com/wp-content/plugins/wccom-plugins/obw-free-extensions/images/google.svg", "manage_url": "admin.php?page=wc-admin&path=%2Fgoogle%2Fstart", "is_visible": [ @@ -501,7 +501,7 @@ "title": "Grow your store", "plugins": [ { - "name": "Google Listings & Ads", + "name": "Google for WooCommerce", "description": "Reach more shoppers and drive sales for your store. Integrate with Google to list your products for free and launch paid ad campaigns.", "image_url": "https://woocommerce.com/wp-content/plugins/wccom-plugins/obw-free-extensions/images/google.svg", "manage_url": "admin.php?page=wc-admin&path=%2Fgoogle%2Fstart", @@ -1034,7 +1034,7 @@ "install_priority": 7 }, { - "name": "Google Listings & Ads", + "name": "Google for WooCommerce", "description": "Reach millions of active shoppers across Google with free product listings and ads.", "image_url": "https://woocommerce.com/wp-content/plugins/wccom-plugins/obw-free-extensions/images/core-profiler/logo-google.svg", "manage_url": "admin.php?page=wc-admin&path=%2Fgoogle%2Fstart", @@ -1042,7 +1042,7 @@ "is_built_by_wc": true, "min_php_version": "7.4", "key": "google-listings-and-ads", - "label": "Drive sales with Google Listings & Ads", + "label": "Drive sales with Google for WooCommerce", "learn_more_link": "https://woocommerce.com/products/google-listings-and-ads", "install_priority": 6 }, diff --git a/plugins/woocommerce-admin/client/activity-panel/panels/help.js b/plugins/woocommerce-admin/client/activity-panel/panels/help.js index 4f4251c334e..2d29a5babb8 100644 --- a/plugins/woocommerce-admin/client/activity-panel/panels/help.js +++ b/plugins/woocommerce-admin/client/activity-panel/panels/help.js @@ -87,7 +87,7 @@ function getMarketingItems( props ) { link: 'https://kb.mailpoet.com/category/114-getting-started', }, activePlugins.includes( 'google-listings-and-ads' ) && { - title: __( 'Set up Google Listing & Ads', 'woocommerce' ), + title: __( 'Set up Google for WooCommerce', 'woocommerce' ), link: 'https://woocommerce.com/document/google-listings-and-ads/?utm_medium=product#get-started', }, activePlugins.includes( 'pinterest-for-woocommerce' ) && { diff --git a/plugins/woocommerce-admin/client/marketing/components/CreateNewCampaignModal/CreateNewCampaignModal.test.tsx b/plugins/woocommerce-admin/client/marketing/components/CreateNewCampaignModal/CreateNewCampaignModal.test.tsx index 4351e7f9d28..486631e197a 100644 --- a/plugins/woocommerce-admin/client/marketing/components/CreateNewCampaignModal/CreateNewCampaignModal.test.tsx +++ b/plugins/woocommerce-admin/client/marketing/components/CreateNewCampaignModal/CreateNewCampaignModal.test.tsx @@ -35,7 +35,7 @@ const google = { 'Boost your product listings with a campaign that is automatically optimized to meet your goals.', createUrl: 'https://wc1.test/wp-admin/admin.php?page=wc-admin&path=/google/dashboard&subpath=/campaigns/create', - channelName: 'Google Listings and Ads', + channelName: 'Google for WooCommerce', channelSlug: 'google-listings-and-ads', }; diff --git a/plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.test.tsx b/plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.test.tsx index cfa9088b95b..e281b8306e8 100644 --- a/plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.test.tsx +++ b/plugins/woocommerce-admin/client/marketing/overview-multichannel/Campaigns/Campaigns.test.tsx @@ -36,7 +36,7 @@ const createTestCampaign = ( programId: string ) => { cost: `USD 30`, manageUrl: `https://wc1.test/wp-admin/admin.php?page=wc-admin&path=/google/dashboard&subpath=/campaigns/edit&programId=${ programId }`, icon: 'https://woocommerce.com/wp-content/uploads/2021/06/woo-GoogleListingsAds-jworee.png', - channelName: 'Google Listings and Ads', + channelName: 'Google for WooCommerce', channelSlug: 'google-listings-and-ads', }; }; @@ -198,7 +198,7 @@ describe( 'Campaigns component', () => { 'Boost your product listings with a campaign that is automatically optimized to meet your goals.', channel: { slug: 'google-listings-and-ads', - name: 'Google Listings & Ads', + name: 'Google for WooCommerce', }, create_url: 'https://wc1.test/wp-admin/admin.php?page=wc-admin&path=/google/dashboard&subpath=/campaigns/create', diff --git a/plugins/woocommerce-admin/client/marketing/overview-multichannel/DiscoverTools/DiscoverTools.test.tsx b/plugins/woocommerce-admin/client/marketing/overview-multichannel/DiscoverTools/DiscoverTools.test.tsx index f173ea50638..a205fccb4a2 100644 --- a/plugins/woocommerce-admin/client/marketing/overview-multichannel/DiscoverTools/DiscoverTools.test.tsx +++ b/plugins/woocommerce-admin/client/marketing/overview-multichannel/DiscoverTools/DiscoverTools.test.tsx @@ -66,7 +66,7 @@ describe( 'DiscoverTools component', () => { isLoading: false, data: [ { - title: 'Google Listings and Ads', + title: 'Google for WooCommerce', description: 'Get in front of shoppers and drive traffic so you can grow your business with Smart Shopping Campaigns and free listings.', url: 'https://woocommerce.com/products/google-listings-and-ads/?utm_source=marketingtab&utm_medium=product&utm_campaign=wcaddons', @@ -95,7 +95,7 @@ describe( 'DiscoverTools component', () => { // Assert that we have the "Sales channels" tab, the plugin name, the "Built by WooCommerce" pill, and the "Install extension" button. expect( screen.getByText( 'Sales channels' ) ).toBeInTheDocument(); expect( - screen.getByText( 'Google Listings and Ads' ) + screen.getByText( 'Google for WooCommerce' ) ).toBeInTheDocument(); expect( screen.getByText( 'Built by WooCommerce' ) diff --git a/plugins/woocommerce/changelog/47614-tweak-google-extension-rename b/plugins/woocommerce/changelog/47614-tweak-google-extension-rename new file mode 100644 index 00000000000..4ac5ec3e8d9 --- /dev/null +++ b/plugins/woocommerce/changelog/47614-tweak-google-extension-rename @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak + +Rename Google Listings and Ads with Google for WooCommerce #### Comment \ No newline at end of file diff --git a/plugins/woocommerce/changelog/tweak-google-extension-rename b/plugins/woocommerce/changelog/tweak-google-extension-rename new file mode 100644 index 00000000000..8a85377cbb9 --- /dev/null +++ b/plugins/woocommerce/changelog/tweak-google-extension-rename @@ -0,0 +1,4 @@ +Significance: patch +Type: tweak + +Rename Google Listings and Ads with Google for WooCommerce diff --git a/plugins/woocommerce/src/Admin/Features/MarketingRecommendations/DefaultMarketingRecommendations.php b/plugins/woocommerce/src/Admin/Features/MarketingRecommendations/DefaultMarketingRecommendations.php index 25f1626d6dc..c46decb0f7f 100644 --- a/plugins/woocommerce/src/Admin/Features/MarketingRecommendations/DefaultMarketingRecommendations.php +++ b/plugins/woocommerce/src/Admin/Features/MarketingRecommendations/DefaultMarketingRecommendations.php @@ -56,7 +56,7 @@ class DefaultMarketingRecommendations { return array( array( - 'title' => 'Google Listings and Ads', + 'title' => 'Google for WooCommerce', 'description' => __( 'Get in front of shoppers and drive traffic so you can grow your business with Smart Shopping Campaigns and free listings.', 'woocommerce' ), 'url' => "https://woocommerce.com/products/google-listings-and-ads/{$utm_string}", 'direct_install' => true, diff --git a/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php b/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php index f81aa2c69ca..06f8ff673ab 100644 --- a/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php +++ b/plugins/woocommerce/src/Internal/Admin/RemoteFreeExtensions/DefaultFreeExtensions.php @@ -93,10 +93,10 @@ class DefaultFreeExtensions { $plugins = array( 'google-listings-and-ads' => array( 'min_php_version' => '7.4', - 'name' => __( 'Google Listings & Ads', 'woocommerce' ), + 'name' => __( 'Google for WooCommerce', 'woocommerce' ), 'description' => sprintf( /* translators: 1: opening product link tag. 2: closing link tag */ - __( 'Drive sales with %1$sGoogle Listings and Ads%2$s', 'woocommerce' ), + __( 'Drive sales with %1$sGoogle for WooCommerce%2$s', 'woocommerce' ), '', '' ), @@ -116,7 +116,7 @@ class DefaultFreeExtensions { ), ), 'google-listings-and-ads:alt' => array( - 'name' => __( 'Google Listings & Ads', 'woocommerce' ), + 'name' => __( 'Google for WooCommerce', 'woocommerce' ), 'description' => __( 'Reach more shoppers and drive sales for your store. Integrate with Google to list your products for free and launch paid ad campaigns.', 'woocommerce' ), 'image_url' => plugins_url( '/assets/images/onboarding/google.svg', WC_PLUGIN_FILE ), 'manage_url' => 'admin.php?page=wc-admin&path=%2Fgoogle%2Fstart', @@ -862,7 +862,7 @@ class DefaultFreeExtensions { 'install_priority' => 1, ), 'google-listings-and-ads' => array( - 'label' => __( 'Drive sales with Google Listings & Ads', 'woocommerce' ), + 'label' => __( 'Drive sales with Google for WooCommerce', 'woocommerce' ), 'image_url' => plugins_url( '/assets/images/core-profiler/logo-google.svg', WC_PLUGIN_FILE ), 'description' => __( 'Reach millions of active shoppers across Google with free product listings and ads.', 'woocommerce' ), 'learn_more_link' => 'https://woocommerce.com/products/google-listings-and-ads?utm_source=storeprofiler&utm_medium=product&utm_campaign=freefeatures', diff --git a/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/core-profiler.spec.js b/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/core-profiler.spec.js index cc595bd2c39..bd90679c90b 100644 --- a/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/core-profiler.spec.js +++ b/plugins/woocommerce/tests/e2e-pw/tests/activate-and-setup/core-profiler.spec.js @@ -113,10 +113,14 @@ test.describe( 'Store owner can complete the core profiler', () => { page.getByRole( 'heading', { name: 'Plugins', exact: true } ) ).toBeVisible(); // confirm that some of the optional extensions aren't present - await expect( page.getByText( 'MailPoet' ) ).toBeHidden(); - await expect( page.getByText( 'Pinterest' ) ).toBeHidden(); await expect( - page.getByText( 'Google Listings & Ads' ) + page.getByText( 'MailPoet for WooCommerce', { exact: true } ) + ).toBeHidden(); + await expect( + page.getByText( 'Pinterest for WooCommerce', { exact: true } ) + ).toBeHidden(); + await expect( + page.getByText( 'Google for WooCommerce', { exact: true } ) ).toBeHidden(); } ); @@ -263,12 +267,18 @@ test.describe( 'Store owner can complete the core profiler', () => { try { await page .getByText( - 'Drive sales with Google Listings & AdsReach millions of active shoppers across' + 'Drive sales with Google for WooCommerceReach millions of active shoppers across' ) .getByRole( 'checkbox' ) .check( { timeout: 2000 } ); } catch ( e ) { - console.log( 'Checkbox not present for Google Listings & Ads' ); + // Temporary fix until rebranding is done. + await page + .getByText( + 'Drive sales with Google Listings & AdsReach millions of active shoppers across' + ) + .getByRole( 'checkbox' ) + .check( { timeout: 2000 } ); } await page.getByRole( 'button', { name: 'Continue' } ).click(); } ); @@ -307,8 +317,12 @@ test.describe( 'Store owner can complete the core profiler', () => { await expect( page.getByText( 'Pinterest for WooCommerce', { exact: true } ) ).toBeVisible(); + await expect( - page.getByText( 'Google Listings and Ads', { exact: true } ) + page.getByText( + /(Google for WooCommerce|Google Listings & Ads)/, + { exact: true } + ) ).toBeVisible(); await expect( page.getByText( 'MailPoet' ) ).toBeHidden(); await expect( page.getByText( 'Jetpack' ) ).toBeHidden(); @@ -338,17 +352,15 @@ test.describe( 'Store owner can complete the core profiler', () => { await test.step( 'Clean up installed extensions', async () => { await page.goto( 'wp-admin/plugins.php' ); - await page.getByLabel( 'Deactivate Google Listings' ).click(); + await page.getByLabel( 'Deactivate Google' ).click(); await expect( page.getByText( 'Plugin deactivated.' ) ).toBeVisible(); // delete plugin regularly or, if attempted, accept deleting data as well try { - await page.getByLabel( 'Delete Google Listings' ).click(); + await page.getByLabel( 'Delete Google' ).click(); await expect( - page.getByText( - 'Google Listings and Ads was successfully deleted.' - ) + page.getByText( 'was successfully deleted.' ) ).toBeVisible( { timeout: 5000 } ); } catch ( e ) { await page @@ -358,9 +370,7 @@ test.describe( 'Store owner can complete the core profiler', () => { .getByText( 'The selected plugin has been deleted.' ) .waitFor(); } - await expect( - page.getByLabel( 'Delete Google Listings' ) - ).toBeHidden(); + await expect( page.getByLabel( 'Delete Google' ) ).toBeHidden(); await page.getByLabel( 'Deactivate Pinterest for' ).click(); await expect( page.getByText( 'Plugin deactivated.' ) @@ -369,9 +379,7 @@ test.describe( 'Store owner can complete the core profiler', () => { try { await page.getByLabel( 'Delete Pinterest for' ).click(); await expect( - page.getByText( - 'Pinterest for WooCommerce was successfully deleted.' - ) + page.getByText( 'was successfully deleted.' ) ).toBeVisible( { timeout: 5000 } ); } catch ( e ) { await page diff --git a/tools/code-analyzer/src/lib/__tests__/fixtures/diff.txt b/tools/code-analyzer/src/lib/__tests__/fixtures/diff.txt index a3cdd517607..6b5b9ba9341 100644 --- a/tools/code-analyzer/src/lib/__tests__/fixtures/diff.txt +++ b/tools/code-analyzer/src/lib/__tests__/fixtures/diff.txt @@ -16490,7 +16490,7 @@ index a27469c37c..b853bf7cd0 100644 @@ -97,8 +88,7 @@ function getMarketingItems( props ) { }, activePlugins.includes( 'google-listings-and-ads' ) && { - title: __( 'Set up Google Listing & Ads', 'woocommerce' ), + title: __( 'Set up Google for WooCommerce', 'woocommerce' ), - link: - 'https://woocommerce.com/document/google-listings-and-ads/?utm_medium=product#get-started', + link: 'https://woocommerce.com/document/google-listings-and-ads/?utm_medium=product#get-started',