Skip to content

Commit

Permalink
Prevent running WC templates logic if the theme has a template
Browse files Browse the repository at this point in the history
  • Loading branch information
Aljullu committed Apr 25, 2024
1 parent e9a4bd2 commit a42f5b2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public function get_block_file_template( $template, $id, $template_type ) {

// If we are not dealing with a WooCommerce template let's return early and let it continue through the process.
$registry_template = BlockTemplateUtils::get_template( $template_slug );
if ( ! $registry_template ) {
if ( ! $registry_template || ! ! BlockTemplateUtils::get_theme_template_path( $template_slug, $template_type ) ) {
return $template;
}

Expand Down

0 comments on commit a42f5b2

Please sign in to comment.