Skip to content

Conversation

@pls78
Copy link
Member

@pls78 pls78 commented Oct 1, 2025

Context

We want to adapt the behavior of the Contact our support team button in the Support page to our new Premium and WooCommerce SEO subscription plans.
Currently, only users who have Yoast SEO Premium installed can access the Helpscout Beacon through the button, which would have a specific beacon_id for Premium.
In light of our switch to plan subscription, we want to:

  1. activate the button when the user has one of the two subscription plans active
  2. set the beacon_id value according to the user's plan: in case the Premium plan is active, we are going to use the Premium beacon_id. Coversely, if the WooCommerce SEO plan is active, we will use the WooCommerce SEO beacon_id

⚠️ This PR must be tested together with its relative Premium one ⚠️

Summary

This PR can be summarized in the following changelog entry:

  • Adapts the behavior of the Contact our support team button in the Support page to our new Premium and WooCommerce SEO subscription plans.

Relevant technical choices:

  • The checks whether the Contact our support team button is active or not have been changed from checking if Premium is installed to checking the user's subscription plan (i.e. if the user has a Premium or WooCommerce SEO valid license).

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Scenario 1: User with no active subscription plans (Free user)
  • Make sure you don't have Premium nor WooCommerce SEO license active
  • Go to Yoast SEO -> Support and verify:
    • There's no Premium badge aside the Contact our support team section title
    • The Contact our support team button is deactivated and shows an upsell
    • The HelpScout beacon says "Need help?"
    • Clicking on the HelpScout beacon opens an Instant answers section
  • Go to another page where the HelpScout beacon is available
    • Verify its behaviour is the same as above
Scenario 2: User with Premium subscription only
  • Make sure you have a Premium license active but not a WooCommerce SEO one
  • Do not activate the Premium plugin
  • Go to Yoast SEO -> Support and verify:
    • There's a Premium badge aside the Contact our support team section title
    • The Contact our support team button is active
    • The HelpScout beacon says "Chat with us"
    • Clicking on the Contact our support team opens a section with two available tabs: Ask and Answers
    • Inspect the page source code
      • Search for window.wpseoHelpScoutBeacon
      • Verify the following directive is found: window.wpseoHelpScoutBeacon('1ae02e91-5865-4f13-b220-7daed946ba25', (...)
  • Go to another page where the HelpScout beacon is available
    • Verify its behaviour is the same as above
    • Verify the same directive is present in the page source code
  • Go to Yoast SEO -> Redirects
    • Verify the page shows an upsell
  • Activate the Premium plugin
  • Go back to Yoast SEO -> Redirects
    • Verify the page functionalities are active
    • Verify you have the Chat with us HelpScout beacon
    • Verify the same directive as above is present in the page source code
Scenario 2: User with WooCommerce subscription only
  • Make sure you have a WooCommerce SEO license active but not a Premium one
  • Do not activate the Premium plugin nor the WooCommerce SEO one
  • Go to Yoast SEO -> Support and verify:
    • There's a Premium badge aside the Contact our support team section title
    • The Contact our support team button is active
    • The HelpScout beacon says "Chat with us"
    • Clicking on the Contact our support team opens a section with two available tabs: Ask and Answers
    • Inspect the page source code
      • Search for window.wpseoHelpScoutBeacon
      • Verify the following directive is found: window.wpseoHelpScoutBeacon('8535d745-4e80-48b9-b211-087880aa857d', (...)
  • Go to another page where the HelpScout beacon is available
    • Verify its behaviour is the same as above
    • Verify the same directive is present in the page source code
  • Go to Yoast SEO -> Redirects
    • Verify the page shows an upsell
  • Activate the WooCommerce SEO plugin
  • Go to Yoast SEO -> WooCommerce SEO
    • Verify you have the Chat with us HelpScout beacon
    • Verify the same directive as above is present in the page source code
  • Activate the Premium plugin
  • Go to Yoast SEO -> Redirects
    • Inspect the source code
    • Search for window.wpseoHelpScoutBeacon
      • Verify the following directive is found: window.wpseoHelpScoutBeacon('1ae02e91-5865-4f13-b220-7daed946ba25', (...)
Scenario 4: User with both Premium and WooCommerce SEO subscriptions
  • Make sure you have both WooCommerce SEO and Premium licenses active
  • Perform the same tests as Scenario 4 and verify nothing changes
Scenario 5: Test the add-ons pages HelpScout Beacon
  • Make sure you have at least one subscription active ( Premium or WooCommerce SEO)
  • Activate Yoast News SEO
  • Go to Yoast SEO -> News SEO
  • Verify you have the Chat with us HelpScout beacon
  • Inspect the source code
  • Search for window.wpseoHelpScoutBeacon
    • Verify the following directive is found: window.wpseoHelpScoutBeacon('1161a6b32-9360-4613-bd04-d8098b283a0f', (...)
  • Perform the same checks for Local SEO and Video SEO
    • Verify you get the same behaviour
    • Verify in the respective plugin source page you have the following directives:
      • Local SEO window.wpseoHelpScoutBeacon('84c1df2c-435a-45ac-8708-f5e3a00843c5', (...)
      • Video SEO window.wpseoHelpScoutBeacon('4e7489db-f907-41b3-9e86-93a01b4df9b0', (...)
Scenario 6: Test this PR with an old version of Premium
  • Make sure you have the WooCommerce SEO plan active
  • Install and activate an old version of Premium
  • Go to Yoast SEO -> Support and verify
    • There's a Premium badge aside the Contact our support team section title
    • The Contact our support team button is active
    • The HelpScout beacon says "Chat with us"
    • Clicking on the Contact our support team opens a section with two available tabs: Ask and Answers
  • Visit any other page (other than any add-on page) that has an active HelpScout Beacon (e.g. Academy)
    • Inspect the page source code
      • Search for window.wpseoHelpScoutBeacon
      • Verify the following directive is found: window.wpseoHelpScoutBeacon('1ae02e91-5865-4f13-b220-7daed946ba25', (...)

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

The browser console should be open to inspect the HelpScout beacon script and verify the correct beacon ID is being used based on subscription status.

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

  • N/A

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #4004

@pls78 pls78 added the changelog: other Needs to be included in the 'Other' category in the changelog label Oct 1, 2025
pls78 added 6 commits October 2, 2025 10:11
…e active

* We now activate it on the basis of the subscription plan the user has: if they have one of the two (Premium or WooCommerce SEO), they beacon is active
* The same goes about the logic used to display the Premium badge
@pls78 pls78 force-pushed the change-helpscout-beacon-behavior branch from e1ee0a6 to 417c698 Compare October 2, 2025 08:12
@coveralls
Copy link

Pull Request Test Coverage Report for Build fe073c719aa457c2646ff38521c9608bf0b0d815

Details

  • 8 of 26 (30.77%) changed or added relevant lines in 3 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.5%) to 53.207%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/js/src/support/app.js 0 4 0.0%
src/integrations/admin/helpscout-beacon.php 0 14 0.0%
Files with Coverage Reduction New Missed Lines %
packages/js/src/support/app.js 1 0.0%
src/integrations/admin/helpscout-beacon.php 1 0.0%
Totals Coverage Status
Change from base Build 672a2ace7e1d05f6447a0d8dd791a221dc6631f2: 0.5%
Covered Lines: 31772
Relevant Lines: 59951

💛 - Coveralls

@pls78 pls78 marked this pull request as ready for review October 2, 2025 09:34
@thijsoo thijsoo added this to the 26.2 milestone Oct 6, 2025
Copy link
Contributor

@thijsoo thijsoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR + ACC 👍

@thijsoo thijsoo merged commit b095d7e into trunk Oct 6, 2025
41 checks passed
@thijsoo thijsoo deleted the change-helpscout-beacon-behavior branch October 6, 2025 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: other Needs to be included in the 'Other' category in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants