__experimental_woocommerce_(product_type)_add_to_cart_with_options_block_template_part filter-hookWC 9.9.0

Filter to declare product type's cart block template is supported.

Usage

add_filter( '__experimental_woocommerce_(product_type)_add_to_cart_with_options_block_template_part', 'wp_kama__experimental_woocommerce_product_type_add_to_cart_with_options_block_template_part_filter', 10, 2 );

/**
 * Function for `__experimental_woocommerce_(product_type)_add_to_cart_with_options_block_template_part` filter-hook.
 * 
 * @param mixed  $false        string|boolean The template part path if it exists
 * @param string $product_type The product type
 *
 * @return mixed
 */
function wp_kama__experimental_woocommerce_product_type_add_to_cart_with_options_block_template_part_filter( $false, $product_type ){

	// filter...
	return $false;
}
$false(mixed)
string|boolean The template part path if it exists
$product_type(string)
The product type

Changelog

Since 9.9.0 Introduced.

Where the hook is called

AddToCartWithOptions::render()
__experimental_woocommerce_(product_type)_add_to_cart_with_options_block_template_part
woocommerce/src/Blocks/BlockTypes/AddToCartWithOptions/AddToCartWithOptions.php 123
$template_part_path = apply_filters( '__experimental_woocommerce_' . $product_type . '_add_to_cart_with_options_block_template_part', false, $product_type );

Where the hook is used in WooCommerce

Usage not found.