Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix wrong template_type passed
  • Loading branch information
Aljullu committed Nov 19, 2021
commit ff180eb003a7d2d0f5af2924d7eb5da5ba686b5e
4 changes: 2 additions & 2 deletions src/BlockTemplatesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ function( $query_result_template ) use ( $template_file ) {
// It would be custom if the template was modified in the editor, so if it's not custom we can load it from
// the filesystem.
if ( 'custom' !== $template_file->source ) {
$template = BlockTemplateUtils::gutenberg_build_template_result_from_file( $template_file, 'wp_template' );
$template = BlockTemplateUtils::gutenberg_build_template_result_from_file( $template_file, $template_type );
} else {
$template_file->title = BlockTemplateUtils::convert_slug_to_title( $template_file->slug );
$query_result[] = $template_file;
Expand Down Expand Up @@ -343,7 +343,7 @@ function ( $template ) use ( $template_slug ) {
'slug' => $template_slug,
'id' => 'woocommerce//' . $template_slug,
'path' => $template_file,
'type' => 'wp_template',
'type' => $template_type,
'theme' => 'woocommerce',
'source' => 'woocommerce',
'title' => BlockTemplateUtils::convert_slug_to_title( $template_slug ),
Expand Down