8000 support old version of premium by vraja-pro · Pull Request #22371 · Yoast/wordpress-seo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

support old version of premium #22371

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

vraja-pro
Copy link
Contributor
@vraja-pro vraja-pro commented Jun 20, 2025

Context

Summary

This PR can be summarized in the following changelog entry:

  • Fix a bug where two buttons of "Use AI" are rendered when using old version of premium.

Relevant technical choices:

  • The free sparks will be released in 25.6. In this PR I'm disabling the free sparks once I have premium version prior.

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Edit a post and check you see one "Use AI" button next to the Search Appearance title and description.
  • Activate Yoast SEO premium version lower than 25.6.
  • Check you still see only one "Use AI"
  • Click on the "Use AI" button and generate title or description.
  • Check you are able to generate title or descriptions and apply it.
  • Edit a product and check you see the "Use AI" button and able to use it.
  • Edit an attachment and check there is no "Use AI" button.
  • Check you can use the ai optimize.
  • Now checkout the feature branch in premium and manually change the version to 25.6 ( do not include RC version )
  • Check you get one "Use AI" button and you are able to generate titles
  • Check you are able to use the AI optimize

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

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

Impact check

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

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

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 abilitie 10000 s.
  • 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 Investigate: What should happen with different versions Free and Premium

@vraja-pro vraja-pro added the changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog label Jun 20, 2025
@coveralls
Copy link
coveralls commented Jun 20, 2025

Pull Request Test Coverage Report for Build 7d68bfe50b62af408d61ea026e4b53a72adb2262

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 16 (0.0%) changed or added relevant lines in 2 files are covered.
  • 3 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.003%) to 52.646%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/js/src/ai-generator/initialize.js 0 4 0.0%
src/conditionals/ai-editor-conditional.php 0 12 0.0%
Files with Coverage Reduction New Missed Lines %
packages/js/src/term-edit.js 1 0.0%
packages/js/src/elementor/initialize.js 1 0.0%
src/conditionals/ai-editor-conditional.php 1 0.0%
Totals Coverage Status
Change from base Build 352e5a01a7e1900b8a811891f8405c46de075b8c: 0.003%
Covered Lines: 30703
Relevant Lines: 59225

💛 - Coveralls

Copy link
Member
@igorschoester igorschoester left a comment

Choose a reason for hiding this comment

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

CR ❓

const isPremium = select( STORE_NAME_EDITOR ).getIsPremium();

// If the older version of premium is active, we don't want to show the Free AI generator button.
if ( isPremium && select( "yoast-seo-premium/ai-generator" ) ) {
Copy link
Member

Choose a reason for hiding this comment

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

This is a smart check 😄

I do think this might be better in the initializeAiGenerator itself, and not create the whole store and add to filters etc. We do quite a bit still, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point!

@vraja-pro vraja-pro force-pushed the 588-investigate-what-should-happen-with-different-versions-free-and-premium branch from 2221836 to 065952f Compare June 26, 2025 13:09
Copy link
Member
@igorschoester igorschoester left a comment

Choose a reason for hiding this comment

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

Even nicer! No scripts to be had.

... if we fix the entry script and removing the imports from the editor 😬

@vraja-pro vraja-pro force-pushed the 588-investigate-what-should-happen-with-different-versions-free-and-premium branch from 9fa51ef to fbded4f Compare June 26, 2025 14:22
@vraja-pro vraja-pro force-pushed the 588-investigate-what-should-happen-with-different-versions-free-and-premium branch 4 times, most recently from dcee038 to 1cb8ca7 Compare June 27, 2025 09:49
@vraja-pro vraja-pro force-pushed the 588-investigate-what-should-happen-with-different-versions-free-and-premium branch from 1cb8ca7 to a362835 Compare June 27, 2025 09:52
Copy link
Member
@pls78 pls78 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: ✅

@pls78 pls78 merged commit 365f9a7 into feature/ai-generator-in-free Jun 27, 2025
36 checks passed
@pls78 pls78 deleted the 588-investigate-what-should-happen-with-different-versions-free-and-premium branch June 27, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0