Adds an upsell for AI Optimize on products#22254
Adds an upsell for AI Optimize on products#22254FAMarfuaty merged 2 commits intofeature/ai-optimize-classicfrom
Conversation
| // Use specific copy for product posts. | ||
| const isWooCommerceActive = useSelect( select => select( STORE ).getIsWooCommerceActive(), [] ); | ||
| const isProductPost = useSelect( select => select( STORE ).getIsProduct(), [] ); | ||
|
|
||
| if ( isWooCommerceActive && isProductPost ) { | ||
| upsellProps.title = __( "Generate product titles & descriptions with AI!", "wordpress-seo" ); | ||
| upsellProps.isProductCopy = true; | ||
| } |
There was a problem hiding this comment.
I moved this out of the getUpsellProps function as this is specific for AI Generate.
Pull Request Test Coverage Report for Build b48403485f0e8008840de72c40ded487fab96ba9Warning: 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
💛 - Coveralls |
|
|
||
| const postModalprops = { | ||
| upsellLink: upsellLinkPremium, | ||
| title: __( "Fix assessments with AI!", "wordpress-seo" ), |
There was a problem hiding this comment.
I assume this was an old variable that is not used anymore? I couldn't find it anywhere anymore 🤔
There was a problem hiding this comment.
Yeah, didn't see it used anywhere 😅
|
CR: Code looks good! 🙌🏽 |
|
Acceptance test: works as expected! 🙌🏽 |
|
I've also updated the feature documentation here |
Context
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
Note
While testing the AI Optimize upsell, smoke test the AI Generate upsell as well, see #22214 for the testing steps.
Prerequisites
Test the Yoast SEO Premium upsell
https://yoa.st/ai-fix-assessments-upsell.f6a84663-465f-4cb5-8ba5-f7a6d72224b2.Test the Yoast WooCommerce SEO upsell
https://yoa.st/ai-fix-assessments-upsell-woo-seo.5b32250e-e6f0-44ae-ad74-3cefc8e427f9.Test the bundle upsell
https://yoa.st/ai-fix-assessments-upsell-woo-seo-premium-bundle.c7e7baa1-2020-420c-a427-89701700b607.Test the happy path
Relevant test scenarios
Test instructions for QA when the code is in the RC
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
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.Documentation
Quality assurance
Innovation
innovationlabel.Fixes https://github.com/Yoast/wordpress-seo-premium/issues/4627