woocommerce_product_editor_product_templates хук-фильтрWC 8.5.0

Allows for new product template registration.

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

add_filter( 'woocommerce_product_editor_product_templates', 'wp_kama_woocommerce_product_editor_templates_filter' );

/**
 * Function for `woocommerce_product_editor_product_templates` filter-hook.
 * 
 * @param  $default_product_templates 
 *
 * @return 
 */
function wp_kama_woocommerce_product_editor_templates_filter( $default_product_templates ){

	// filter...
	return $default_product_templates;
}
$default_product_templates
-

Список изменений

С версии 8.5.0 Введена.

Где вызывается хук

Init::register_product_templates()
woocommerce_product_editor_product_templates
woocommerce/src/Admin/Features/ProductBlockEditor/Init.php 409
$this->product_templates = apply_filters( 'woocommerce_product_editor_product_templates', $this->get_default_product_templates() );

Где используется хук в WooCommerce

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