diff --git a/plugins/woocommerce/includes/class-wc-template-loader.php b/plugins/woocommerce/includes/class-wc-template-loader.php index 43c1135c0f5..2adec2db212 100644 --- a/plugins/woocommerce/includes/class-wc-template-loader.php +++ b/plugins/woocommerce/includes/class-wc-template-loader.php @@ -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 ); } /**