Update has_block_template function to use a filter

This commit is contained in:
Tom Cafferkey 2021-10-20 15:44:16 +01:00
parent 8d312150fe
commit b4526429cb
1 changed files with 1 additions and 3 deletions

View File

@ -107,9 +107,7 @@ class WC_Template_Loader {
return false;
}
return is_readable(
get_stylesheet_directory() . '/block-templates/' . $template_name . '.html'
);
return apply_filters( 'wc_has_block_template', is_readable( get_stylesheet_directory() . '/block-templates/' . $template_name . '.html' ) );
}
/**