Update plugins/woocommerce/includes/class-wc-template-loader.php

Co-authored-by: Barry Hughes <3594411+barryhughes@users.noreply.github.com>
This commit is contained in:
Tom Cafferkey 2021-10-29 16:16:10 +01:00 committed by GitHub
parent 3047603e2b
commit f8eebbecbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ class WC_Template_Loader {
return false;
}
$has_template = (bool) is_readable( get_stylesheet_directory() . '/block-templates/' . $template_name . '.html' );
$has_template = is_readable( get_stylesheet_directory() . '/block-templates/' . $template_name . '.html' );
/**
* Filters the value of the result of the block template check.
@ -117,7 +117,7 @@ class WC_Template_Loader {
* @param boolean $has_template value to be filtered.
* @param string $template_name The name of the template.
*/
return apply_filters( 'woocommerce_has_block_template', $has_template, $template_name );
return (bool) apply_filters( 'woocommerce_has_block_template', $has_template, $template_name );
}
/**