Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup woocommerceUpsell and add upsell links to store #21063

Open
vraja-pro opened this issue Jan 22, 2024 · 0 comments
Open

Cleanup woocommerceUpsell and add upsell links to store #21063

vraja-pro opened this issue Jan 22, 2024 · 0 comments

Comments

@vraja-pro
Copy link
Contributor

vraja-pro commented Jan 22, 2024

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.js and:
    • 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
  • Change woocommerceUpsell to use getIsWooSeoUpsell from the store in:
    • packages/js/src/components/SchemaTab.js
    • packages/js/src/containers/SnippetEditor.js
  • Change woocommerceUpsellLink to use the store in
    • packages/js/src/components/SchemaTab.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant