-
Notifications
You must be signed in to change notification settings - Fork 219
Mini Cart template part: give user customized template priority over theme template #9005
Mini Cart template part: give user customized template priority over theme template #9005
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
}, | ||
$saved_woo_templates | ||
); | ||
return BlockTemplateUtils::get_block_templates_from_db( $slugs, $template_type ); |
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 guess it's ok to move this function to BlockTemplateUtils.php
?
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.
Should we use the BlockTemplateUtils::get_block_templates_from_db
in line 448 and remove this one since it's just wrapping the BlockTemplateUtils
one?
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.
Pre-approving with just one comment :)
}, | ||
$saved_woo_templates | ||
); | ||
return BlockTemplateUtils::get_block_templates_from_db( $slugs, $template_type ); |
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.
Should we use the BlockTemplateUtils::get_block_templates_from_db
in line 448 and remove this one since it's just wrapping the BlockTemplateUtils
one?
Makes sense, done in 02c1ac5!
I'm not sure about this one. Given that this is a public method, another extension could have started using it and we might break it if we remove, no? Do you think we should mark it as deprecated (via |
Oh, that makes total sense, I didn't think about that case. We can deprecate it I guess. |
c59eff4
to
7e82588
Compare
Fixes #8929.
Testing
User Facing Testing
parts/mini-cart.html
file): twentytwentythree.zip.In other words, given that you created a custom template in step 1, you should never see the template from the theme.
WooCommerce Visibility
Performance Impact
Changelog