Single product templates that have been edited by the merchant can't be selected in the edit product screen #42630
Labels
focus: FSE
Issues related to Full Site Editing
team: Kirigami & Origami
type: bug
The issue is a confirmed bug.
This issue might require changes in WC core or Gutenberg repos, but I'm creating this in WC Blocks repo for ease of tracking it.
To reproduce
/themes/twentytwentytwo/templates/another-single-product.html
customTemplates
intheme.json
:Expected behavior
If the merchant makes an edit to a template that has
postTypes: [ 'product' ]
, it should still be available when editing or creating products.More info
I think the issue comes from the fact that WC uses
get_block_template()
, which internally calls_build_block_template_result_from_post()
. And the latter, doesn't add apost_types
attribute to templates returned.The text was updated successfully, but these errors were encountered: