WC_Brands_Block_Templates::get_block_file_template()publicWC 1.0

Get the block template for Taxonomy Product Brand if requested. Triggered by get_block_file_template action

Метод класса: WC_Brands_Block_Templates{}

Хуков нет.

Возвращает

WP_Block_Template|null. The taxonomy-product_brand template.

Использование

$WC_Brands_Block_Templates = new WC_Brands_Block_Templates();
$WC_Brands_Block_Templates->get_block_file_template( $block_template, $id, $template_type );
$block_template(WP_Block_Template|null) (обязательный)
The current Block Template loaded, if any.
$id(строка) (обязательный)
The template id normally in the format theme-slug//template-slug.
$template_type(строка) (обязательный)
The post_type for the template. Normally wp_template or wp_template_part.

Код WC_Brands_Block_Templates::get_block_file_template() WC 9.6.1

public function get_block_file_template( $block_template, $id, $template_type ) {
	if ( $this->is_taxonomy_product_brand_template( $id ) && is_null( $block_template ) ) {
		$block_template = $this->get_product_brands_template( $template_type );
	}

	return $block_template;
}