WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\Utils

BlockTemplateUtils::gutenberg_get_template_paths() public WC 1.0

Finds all nested template part file paths in a theme's directory.

{} It's a method of the class: BlockTemplateUtils{}

No Hooks.

Return

Array. $path_list A list of paths to all template part files.

Usage

$result = BlockTemplateUtils::gutenberg_get_template_paths( $base_directory );
$base_directory(string) (required)
The theme's file path.

Code of BlockTemplateUtils::gutenberg_get_template_paths() WC 6.1.1

public static function gutenberg_get_template_paths( $base_directory ) {
	$path_list = array();
	if ( file_exists( $base_directory ) ) {
		$nested_files      = new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator( $base_directory ) );
		$nested_html_files = new \RegexIterator( $nested_files, '/^.+\.html$/i', \RecursiveRegexIterator::GET_MATCH );
		foreach ( $nested_html_files as $path => $file ) {
			$path_list[] = $path;
		}
	}
	return $path_list;
}