woocommerce_product_type_query filter-hookWC 1.0

Allow the overriding of the lookup in this function. Return the product type here.

Usage

add_filter( 'woocommerce_product_type_query', 'wp_kama_woocommerce_product_type_query_filter', 10, 2 );

/**
 * Function for `woocommerce_product_type_query` filter-hook.
 * 
 * @param  $false      
 * @param  $product_id 
 *
 * @return 
 */
function wp_kama_woocommerce_product_type_query_filter( $false, $product_id ){

	// filter...
	return $false;
}
$false
-
$product_id
-

Where the hook is called

WC_Product_Factory::get_product_type()
woocommerce_product_type_query
woocommerce/includes/class-wc-product-factory.php 79
$override = apply_filters( 'woocommerce_product_type_query', false, $product_id );

Where the hook is used in WooCommerce

Usage not found.