-
Notifications
You must be signed in to change notification settings - Fork 217
Fallback to customized Product Archive template if no better Category or Tag templates are present #5563
Conversation
Size Change: 0 B Total Size: 868 kB ℹ️ View Unchanged
|
Few things to note:
Not sure if I'm doing anything wrong here? |
@tjcafferkey I think I addressed all the concerns and I have tested more extensively. Now all the three cases you pointed out should work. Thanks for noticing them 🤦♀️ |
When I created a |
@tjcafferkey Could you elaborate on what you do exactly? Are you sure that in your customizations you have the legacy block activated? I tried to reproduce in several ways, even completely deactivating and cloning from scratch. Here is a video of the flow working for me: pr-5563-demo.movPerhaps I'm getting something wrong? |
I've tried to replicate again but can't so it looks like it will have been an issue on my end. However I've done some more testing and there a number of bugs which I've found, please see my recording. Happy to go through this with you on a call if needed, looks like this particular issue might be a little more complex than we first thought. fix-5520.mp4 |
1:48 I was like: 😱 Whaat? Thanks for the extensive testing, @tjcafferkey. I'm going to be back to the drawing board. |
This PR has been marked as If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label - otherwise it will automatically be closed after 10 days. |
We had postponed looking into this and its complex behaviours because we decided to go on with E2E tests and make sure such random edge cases could not happen as we focus on this. Perhaps it's time for me to pick this up again :) |
… or Tag templates are present If the user has customized the `archive-product` template and there is no better choice for the Category or Tag, then the custom Product Archive is chosen. The priority order is the following: 1. Custom Taxonomy Template 2. Taxonomy Template from the Theme 3. Custom Product Archive Template 4. Product Archive Template from the Theme Fixes #5520
This is because we want to use the mock theme as a testbed for template override logic.
39d209a
to
b971de3
Compare
This PR has been marked as If deemed still relevant, the pr can be kept active by ensuring it's up to date with the main branch and removing the stale label - otherwise it will automatically be closed after 10 days. |
If the user has customized the
archive-product
template and there is no better choice for the Categoryor Tag, then the custom Product Archive is chosen.
The priority order is the following:
Fixes woocommerce/woocommerce#42656
P.S. Not sure about the labels here.
Screenshots
Testing
Manual Testing
How to test the changes in this Pull Request:
archive-product.html
but no taxonomy templates (or add your own to the theme).archive-product
and save.User Facing Testing
These are steps for user testing (where "user" is someone interacting with this change that is not editing any code).
Changelog