experimental_woocommerce_product_editor_product_template_id_for_product filter-hookWC 9.1.0

Experimental: Allows to determine a product template id based on the product data.

Usage

add_filter( 'experimental_woocommerce_product_editor_product_template_id_for_product', 'wp_kama_experimental_woocommerce_product_editor_template_id_for_filter', 10, 2 );

/**
 * Function for `experimental_woocommerce_product_editor_product_template_id_for_product` filter-hook.
 * 
 * @param  $string  
 * @param  $product 
 *
 * @return 
 */
function wp_kama_experimental_woocommerce_product_editor_template_id_for_filter( $string, $product ){

	// filter...
	return $string;
}
$string
-
$product
-

Changelog

Since 9.1.0 Introduced.

Where the hook is called

Init::possibly_add_template_id()
experimental_woocommerce_product_editor_product_template_id_for_product
woocommerce/src/Admin/Features/ProductBlockEditor/Init.php 106
$product_template_id = apply_filters( 'experimental_woocommerce_product_editor_product_template_id_for_product', '', $product );

Where the hook is used in WooCommerce

Usage not found.