Google now shows the ShoppingData information at the bottom, while we were still showing this info right under the title. This needed to be changed, so that our Google preview reflects the shopping information correctly.
This PR can be summarized in the following changelog entry:
[@yoast/search-metadata-previews] Fixes an unreleased bug where the design of the Google Preview with product data did not match the latest real world examples.
Relevant technical choices:
Still using the renderProductData function to make sure no PartContainer is inserted when no ShoppingData is present.
Also decided to tweak line-height and margin a bit to achieve looks closer to Google's.
Test instructions
This PR can be tested by following these steps:
Checkout this branch together with WP SEO 16.3RC or trunk and WP SEO for Woocommerce 14.0-beta or trunk.
Add a product and fill price and availability and / or add one or more reviews.
Save the product and refresh the page.
Check that the Google preview looks the same as on the screenshots in this PR.
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.
Quality assurance
[X] I have tested this code to the best of my abilities
[ ] I have added unittests to verify the code works as intended
Summary
Google now shows the ShoppingData information at the bottom, while we were still showing this info right under the title. This needed to be changed, so that our Google preview reflects the shopping information correctly.
This PR can be summarized in the following changelog entry:
Relevant technical choices:
renderProductData
function to make sure no PartContainer is inserted when no ShoppingData is present.Test instructions
This PR can be tested by following these steps:
Impact check
UI changes
Quality assurance
Fixes P1-487