wordpress-seo
wordpress-seo copied to clipboard
Include grouped products for SKU and product identifier assessments
Context
Summary
This PR can be summarized in the following changelog entry:
- Fixes an unreleased bug where the SKU and Product identifier assessments did not work for Grouped products.
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:
- Activate Yoast SEO Free, Woocommerce and Yoast SEO for Woocommerce For devs: Run composer require yoast/wordpress-seo:dev-PC-522-add-SKU-identifiers-assessment-for-grouped-products@dev --dev before building in Free
- Create a new product
- Check that the SKU assessment shows orange and says:
Your product is missing a SKU. Include this if you can, as it will help search engines to better understand your content.
- Hover over the links in the feedback strings. Confirm that the first link starts with
<https://yoa.st/4lw>
and the second one with<https://yoa.st/4lx>
- Change the product type to Grouped product in
Product data
- Check that the assessment results do not change
- Add a SKU to the product
- Check that the SKU assessment says
Your product has a SKU. Good job!
- Remove the SKU
- Check that the SKU assessment shows orange and says
Your product is missing a SKU. Include this if you can, as it will help search engines to better understand your content.
- Add a title and save the product as a draft
- Check that the assessment still shows up and the result does not change
- Repeat the same steps for the Product identifiers assessment. (NOTE: for this assessment the feedback strings are expected to be
<https://yoa.st/4ly>
for the first link and<https://yoa.st/4lz>
for the second link)
Relevant test scenarios
- [x] 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 (Block/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 theShopify
label to this PR.
Documentation
- [ ] I have written documentation for this change.
Quality assurance
- [x] I have tested this code to the best of my abilities
- [ ] 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.
- [x] I have written this PR in accordance with my team's definition of done.
Fixes #https://yoast.atlassian.net/jira/software/c/projects/PC/boards/138?modal=detail&selectedIssue=PC-522
Note: let's not merge this PR for now since it's a change impacting Woo, but we don't know yet when we'll release the Woo add-on the next time.
CRed. Adjusted testing instructions so that a title is added before the product is saved, because otherwise the grouped product switches back to a simple product and all SKU/PI entries are deleted. This is normal behaviour, apparently you can't save a grouped/ variable product in Woo without adding a title.
CR: Small changes. All checks out. Good job!
Acceptance test, happy to merge. All works as expected.