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

Commit

Permalink
Make it so WooCommerce template names is not editable
Browse files Browse the repository at this point in the history
  • Loading branch information
Aljullu committed Dec 15, 2021
1 parent 6d398e8 commit e71414b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Utils/BlockTemplateUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public static function gutenberg_build_template_result_from_post( $post ) {
$template->title = $post->post_title;
$template->status = $post->post_status;
$template->has_theme_file = $has_theme_file;
$template->is_custom = true;
$template->is_custom = false;
$template->post_types = array(); // Don't appear in any Edit Post template selector dropdown.
if ( 'wp_template_part' === $post->post_type ) {
$type_terms = get_the_terms( $post, 'wp_template_part_area' );
Expand Down Expand Up @@ -142,7 +142,7 @@ public static function gutenberg_build_template_result_from_file( $template_file
$template->status = 'publish';
$template->has_theme_file = true;
$template->origin = 'plugin';
$template->is_custom = false; // Templates loaded from the filesystem aren't custom, ones that have been edited and loaded from the DB are.
$template->is_custom = false;
$template->post_types = array(); // Don't appear in any Edit Post template selector dropdown.
$template->area = 'uncategorized';
return $template;
Expand Down

0 comments on commit e71414b

Please sign in to comment.