woocommerce_product_editor_product_templates filter-hookWC 8.5.0

Allows for new product template registration.

Usage

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
-

Changelog

Since 8.5.0 Introduced.

Where the hook is called

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

Where the hook is used in WooCommerce

Usage not found.