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
Avoid duplicate templates appearing on the Site Editor when the WooCommerce template and the theme template have been customized by the user #44000
Avoid duplicate templates appearing on the Site Editor when the WooCommerce template and the theme template have been customized by the user #44000
Conversation
…mmerce template and the theme template have been customized by the user
0b62dc5
to
bc4fd29
Compare
}; | ||
}; | ||
|
||
export const CUSTOMIZABLE_WC_TEMPLATES: TemplateCustomizationTest[] = [ |
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.
While this constant is currently only used in one file (template-customization.block_theme.side_effects.spec.ts
), my plan is to update template-user-customization.block_theme_with_templates.spec.ts
and template-user-customization.block_theme.spec.ts
to use it as well.
…mmerce-blocks, woocommerce
9e082f0
to
a27ca4a
Compare
Test Results SummaryCommit SHA: 18d70ce
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
Hi @dinhtungdu, 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.
I can confirm issue is fixed following the testing instruction in my tests. The code also looks good to me. I left a minor but non blocking comment. Approving 🚢
Changes proposed in this Pull Request:
Fixes #42220.
Blocks #43794.
As mentioned in #42220, if the user modified a WooCommerce templates twice, once using the WooCommerce template as the base and the other time using the theme templates as the base, we ended up with duplicate templates on the list.
This PR fixes that and adds some tests to verify we don't introduce regressions in the future.
How to test the changes in this Pull Request:
/wp-admin/site-editor.php?postId=theme-tsubaki%2F%2Fsingle-product&postType=wp_template&canvas=edit
. Note: thetheme-tsubaki
part of the URL might change depending on the ZIP file name that you uploaded. In case of doubt, go to Appearance > Editor > Templates > Template Catalog and look at the URL./wp-admin/site-editor.php?path=%2Fwp_template%2Fall
.Changelog entry
Significance
Type
Message
Avoid duplicate templates appearing on the Site Editor when the WooCommerce template and the theme template have been customized by the user
Comment