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

Modify BlockTemplateController to server Block Templates #4971

Closed
tjcafferkey opened this issue Oct 20, 2021 · 0 comments · Fixed by #4984
Closed

Modify BlockTemplateController to server Block Templates #4971

tjcafferkey opened this issue Oct 20, 2021 · 0 comments · Fixed by #4984
Assignees
Labels
focus: FSE Work related to prepare WooCommerce for FSE. focus: template Related to API powering block template functionality in the Site Editor type: enhancement The issue is a request for an enhancement.

Comments

@tjcafferkey
Copy link
Contributor

Depends on #4969 and #4970

Description

Similar to whats shown here we need to add some methods to the BlockTemplateController which first checks if the user has Block Templates for Woo (such as single-product.html) in their theme and if not server them the default block template files from woo-blocks-plugin/templates/block-templates by making use of the filter added in #4970

Acceptance Criteria

  • Given a user has an appropriate Block Template in their theme (e.g. single-product.html), we will not render them the default one from Woo Blocks
  • Given a user does not have a Block Template in their theme for a WooCommerce page. We will serve them the default template from woo-blocks-plugin/templates/block-templates if its available.
  • Given a user does not a Block Template in their theme, or one available in woo-blocks-plugin/templates/block-templates then we will fall back to the legacy PHP template
@tjcafferkey tjcafferkey added status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. type: enhancement The issue is a request for an enhancement. focus: FSE Work related to prepare WooCommerce for FSE. focus: template Related to API powering block template functionality in the Site Editor and removed status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. labels Oct 20, 2021
@tjcafferkey tjcafferkey self-assigned this Oct 25, 2021
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. focus: template Related to API powering block template functionality in the Site Editor type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant