Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Update the path of WooCommerce templates to match the new Gutenberg folders #5343

Closed
Aljullu opened this issue Dec 9, 2021 · 2 comments · Fixed by #5464
Closed

Update the path of WooCommerce templates to match the new Gutenberg folders #5343

Aljullu opened this issue Dec 9, 2021 · 2 comments · Fixed by #5464
Assignees
Labels
focus: FSE Work related to prepare WooCommerce for FSE. priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: bug The issue/PR concerns a confirmed bug.

Comments

@Aljullu
Copy link
Contributor

Aljullu commented Dec 9, 2021

In WordPress/gutenberg#36647, Gutenberg changed the folder names of block themes to use templates and parts instead of block-templates and block-template-parts. In WooCommerce, we are using the old ones, it's not a big deal because we are not a theme and are loading them via hooks, but still, it would be great to update our directory structure to use the new one.

@Aljullu Aljullu added type: bug The issue/PR concerns a confirmed bug. priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. focus: FSE Work related to prepare WooCommerce for FSE. labels Dec 9, 2021
@tjcafferkey
Copy link
Contributor

Closing as this is a duplicate of #5450 and I believe has now become more important as we are checking theme files for the existence of templates before loading our own.

sunyatasattva added a commit that referenced this issue Dec 24, 2021
…nvention

Gutenberg 12.1.0 has changed the convention for the directory paths from
`block-templates` and `block-template-parts` to `templates` and `parts` respectively.

We are also moving to that convention but making sure that we remain
backwards-compatible.

Fixes #5450, #5343
@tjcafferkey
Copy link
Contributor

Closing as this is a duplicate of #5450 and I believe has now become more important as we are checking theme files for the existence of templates before loading our own.

Reopening this issue. It's not quite the same as #5450 where we need to update the paths of the theme file locations we are checking. This PR should just be scoped to renaming the Woo Block directories where we are storing Core block templates

@tjcafferkey tjcafferkey reopened this Dec 26, 2021
@sunyatasattva sunyatasattva self-assigned this Dec 27, 2021
sunyatasattva added a commit that referenced this issue Dec 27, 2021
Will open a different PR to address #5343
sunyatasattva added a commit that referenced this issue Dec 27, 2021
While we now support both the old and new conventions for the templates
paths, our own repo should be aligned with the latest convention.

See: #5455
Fixes: #5343
sunyatasattva added a commit that referenced this issue Dec 27, 2021
While we now support both the old and new conventions for the templates
paths, our own repo should be aligned with the latest convention.

See: #5455
Fixes: #5343
sunyatasattva added a commit that referenced this issue Dec 27, 2021
While we now support both the old and new conventions for the templates
paths, our own repo should be aligned with the latest convention.

See: #5455
Fixes: #5343
sunyatasattva added a commit that referenced this issue Dec 27, 2021
While we now support both the old and new conventions for the templates
paths, our own repo should be aligned with the latest convention.

See: #5455
Fixes: #5343
sunyatasattva added a commit that referenced this issue Dec 28, 2021
While we now support both the old and new conventions for the templates
paths, our own repo should be aligned with the latest convention.

See: #5455
Fixes: #5343
sunyatasattva added a commit that referenced this issue Dec 28, 2021
While we now support both the old and new conventions for the templates
paths, our own repo should be aligned with the latest convention.

See: #5455
Fixes: #5343
sunyatasattva added a commit that referenced this issue Jan 5, 2022
…5464)

* Align Woo Block template locations with the newest convention

While we now support both the old and new conventions for the templates
paths, our own repo should be aligned with the latest convention.

See: #5455
Fixes: #5343

* Simplify `generate_template_slug_from_path` function
* Change `BlockTemplatesController` constructor to get correct dir names
* Update Mini Cart template path
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: FSE Work related to prepare WooCommerce for FSE. priority: low The issue/PR is low priority—not many people are affected or there’s a workaround, etc. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants