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
Recognise if Product Collection is located inside Cart or Checkout blocks #46059
Recognise if Product Collection is located inside Cart or Checkout blocks #46059
Conversation
Hi @xristos3490, @Aljullu, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, @kmanijak! Works as expected!
…ocks (#46059) * Recognise if Product Collection is inside Cart or Checkout blocks * Upgrade priority block recognition over templates * Update the comments to better depict the flow * Add changelog * Simplify the logic
Submission Review Guidelines:
Changes proposed in this Pull Request:
In #43997 we implemented a location/context recognition for Product Collection block. Among others, the logic should recognize if we're in scope of Cart and Checkout. While it did a good job with templates, the logic didn't take into account if Product Collection block is placed inside Cart or Checkout blocks.
It will be a common use case for example with Upsells and Cross-Sells collections.
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
Prerequisites to testing:
product isproductcollection
Testing steps:
location[type]: cart
Changelog entry
Significance
Type
Message
Comment