Add a Yoast WooCommerce SEO upsell card to the product editor metabox - #23609
Draft
JorPV wants to merge 3 commits into
Draft
Add a Yoast WooCommerce SEO upsell card to the product editor metabox#23609JorPV wants to merge 3 commits into
JorPV wants to merge 3 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The old upsell is unintentionally removed from product taxonomy screens, and the new card skips a heading level.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a product-editor metabox card promoting Yoast WooCommerce SEO and replaces the previous Search appearance upsell.
Changes:
- Adds a gated WooCommerce SEO upsell card.
- Adds component tests for visibility, content, and CTA behavior.
- Removes the existing Search appearance upsell.
File summaries
| File | Description |
|---|---|
packages/js/src/components/WooSeoProductUpsellAd.js |
Implements the new upsell card. |
packages/js/src/components/fills/MetaboxFill.js |
Adds the card to the metabox introduction. |
packages/js/src/containers/SnippetEditor.js |
Removes the previous inline upsell. |
packages/js/tests/components/WooSeoProductUpsellAd.test.js |
Tests card rendering and gating. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| id="woo-seo-product-upsell-ad" | ||
| className="yst-border yst-border-woo-light yst-border-opacity-30 yst-rounded-lg yst-shadow-md yst-p-4" | ||
| > | ||
| <Title as="h4" className="yst-text-woo-light yst-text-base yst-font-medium yst-mb-2 yst-flex yst-gap-2"> |
| @@ -1,12 +1,11 @@ | |||
| import { compose } from "@wordpress/compose"; | |||
| import { withDispatch, withSelect, useSelect } from "@wordpress/data"; | |||
| import { withDispatch, withSelect } from "@wordpress/data"; | |||
Coverage Report for CI Build 0Coverage increased (+0.009%) to 56.724%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions2 previously-covered lines in 1 file lost coverage.
Coverage Stats💛 - Coveralls |
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
In the product editor, Yoast SEO Free currently upsells Yoast WooCommerce SEO with a small text-and-button block inside the Search appearance section. As part of the AI product image alt text project, the design moves this to a dedicated card at the top of the Yoast SEO meta box that lists what the add-on brings: product schema, GTIN and SKU assessments, image alt text assessments, and bulk AI-generated alt text. The card only shows for product posts when WooCommerce is active and Yoast WooCommerce SEO is not. Since the new card supersedes it, the Search appearance upsell is removed.
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices
MetaboxFill, inside the editor intro.getIsWooSeoUpsellplusgetIsProduct. Reuses the existing upsell selector, narrowed to product posts so product categories and tags do not get the card.Test instructions
Test instructions for the acceptance test before the PR gets merged
yoa.st/woo-seo-product-editor-upsellin a new tab.7a. [ ] Go to Products > Tags, edit a tag and confirm the card does not appear in its Yoast SEO meta box.
cd packages/js && yarn jest tests/components/WooSeoProductUpsellAd.test.js; expect 4 passing tests.Style checks
Compare against the design with the browser inspector open on the card (
#woo-seo-product-upsell-ad).1pxsolid border inrgba(0, 117, 179, 0.3)(Woo blue at 30%), an8pxcorner radius,16pxpadding on all sides and a soft drop shadow; confirm it spans the full width of the meta box content, the same width as the Optimize your content for discovery. line above it.h4in#0075B3(rgb(0, 117, 179)) at16px, font weight500, with8pxof space below it; confirm the cart icon next to it is16pxwide, faces left and has the same blue.13pxtext in#475569(rgb(71, 85, 105)), with8pxbetween the description and the list and4pxbetween the benefit lines.18px×18pxin#22C55E(rgb(34, 197, 94)) with an8pxgap to its text, and that long benefit lines wrap under the text, not under the icon.28pxtall, background#FCD34D(rgb(252, 211, 77)), text#78350F(rgb(120, 53, 15)) at12pxfont weight500,6pxcorner radius,6pxvertical and10pxhorizontal padding, a16pxlock icon with6pxto the label, and16pxof space between the benefit list and the button.#FBBF24(rgb(251, 191, 36)); Tab to it and confirm a visible focus ring; resize the window to about1024pxwide and confirm the text wraps inside the card without overflowing.Relevant test scenarios
Test instructions for QA when the code is in the RC
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
Other environments
Documentation
Quality assurance
Innovation
Fixes https://github.com/Yoast/reserved-tasks/issues/1402