-
Notifications
You must be signed in to change notification settings - Fork 219
Check that the customized fallback template is archive-product before… #9330
Check that the customized fallback template is archive-product before… #9330
Conversation
… unsetting the source property
The release ZIP for this PR is accessible via:
Script Dependencies ReportThe
This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: 0 B Total Size: 1.11 MB ℹ️ View Unchanged
|
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.
👏
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.
Great job! Thank you for solving this so quickly. I'm approving this PR and just raising a small issue I found that is probably not related to this PR but I noticed it during the tests. Here are the results from what I've tested:
✅ When editing the Products by Category template, the changes are reflected on the frontend and no additional template is created
✅ When editing the Products by Tag template, the changes are reflected on the frontend and no additional template is created
✅ When editing the Product by Attribute template, the changes are reflected on the frontend and no additional template is created
✅ When editing the Product Catalog template, the changes are reflected on the frontend and no additional template is created
✅ When editing the Single Product template, the changes are reflected on the frontend and no additional template is created
✅ When editing the Home template, the changes are reflected on the frontend and no additional template is created
✅ When creating a new template from Products by Category (and selecting the Hoodies) category, the changes are reflected on the frontend and no additional template is created
admin
(the author editing the template) but after 1-2 seconds it returns to its original value "WooCommerce". Apparently, this behavior only occurs with templates added by WooCommerce. I don't think this is a blocker, and not sure if this is an expected behavior. Here is a video showing this happening:
template-issue.mov
… unsetting the source property (#9330)
* Empty commit for release pull request * Add 10.0.3 changelog * Update versions to 10.0.3 * Fix image editor in Featured Product/Category blocks on WP 6.2 (#9142) * Add 10.0.3 testing steps * Empty commit for release pull request * Check that the customized fallback template is archive-product before unsetting the source property (#9330) * use 'enqueue_block_assets' is available (#9332) * Remove esc_url() on self generated link to edit the Mini Cart template since it gets escaped in JS (#9348) * Add changelog entries to readme.txt * Update version number in several files * Add testing notes for the release * Add #9332 to testing notes * Add testing on frontend for #9332 --------- Co-authored-by: github-actions <[email protected]> Co-authored-by: Albert Juhé Lluveras <[email protected]> Co-authored-by: Tom Cafferkey <[email protected]> Co-authored-by: Luigi Teschio <[email protected]> Co-authored-by: Alexandre Lara <[email protected]>
When we create a customized version of an already customized fallback
archive-product
template (e.g. a Product Category template), we unset thesource
property introduced here #7975However, when we don't customize the Product Catalog template first we still unset this property which results in a database entry for being created for every customization. We need to only unset this property if the template we're customizing is a fallback version of the
archive-product
which forces WordPress to create a new database entry for our template.Fixes #9275
Other Checks
Testing
Automated Tests
User Facing Testing
WooCommerce Visibility
Performance Impact
Changelog