wordpress-seo
wordpress-seo copied to clipboard
Cleanup woocommerceUpsell and add upsell links to store
What is the goal of this issue?
In a later issue, property of isWooSeoActive was added to metabox script data. That means woocommerceUpsell can be removed and calculated in the store.
What needs to be done to achieve the goal?
- Go to
packages/js/src/redux/selectors/isWooSEO.jsand:- Add getIsWooActive, and
export const getWoocommerceUpsellLink = get( window, "wpseoScriptData.metabox.woocommerceUpsellSchemaLink", "" ); - Change getIsWooSeoUpsell to be calculated from the properties in the store: getIsProduct, getIsWooSeoActive, getIsWooActive
- Add getIsWooActive, and
- Change
woocommerceUpsellto usegetIsWooSeoUpsellfrom the store in:packages/js/src/components/SchemaTab.jspackages/js/src/containers/SnippetEditor.js
- Change
woocommerceUpsellLinkto use the store inpackages/js/src/components/SchemaTab.js