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

Change source value on WooCommerce block templates to be plugin #5215

Merged
merged 1 commit into from
Nov 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BlockTemplatesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ function ( $template ) use ( $template_slug ) {
'path' => $template_file,
'type' => $template_type,
'theme' => 'woocommerce',
'source' => 'woocommerce',
'source' => 'plugin',
'title' => BlockTemplateUtils::convert_slug_to_title( $template_slug ),
'description' => '',
'post_types' => array(), // Don't appear in any Edit Post template selector dropdown.
Expand Down
2 changes: 1 addition & 1 deletion src/Utils/BlockTemplateUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ public static function gutenberg_build_template_result_from_file( $template_file
$template->id = 'woocommerce//' . $template_file->slug;
$template->theme = 'woocommerce';
$template->content = self::gutenberg_inject_theme_attribute_in_content( $template_content );
$template->source = 'woocommerce';
$template->source = 'plugin';
$template->slug = $template_file->slug;
$template->type = $template_type;
$template->title = ! empty( $template_file->title ) ? $template_file->title : self::convert_slug_to_title( $template_file->slug );
Expand Down