product_type_selector │ filter-hook │ WC 2.2

Get product types.

Usage

add_filter( 'product_type_selector', 'wp_kama_product_type_selector_filter' );

/**
 * Function for `product_type_selector` filter-hook.
 * 
 * @param  $array 
 *
 * @return 
 */
function wp_kama_product_type_selector_filter( $array ){
	// filter...
	return $array;
}
$array
-

Changelog

Since 2.2 Introduced.

Where the hook is called

wc_get_product_types()
product_type_selector
woocommerce/includes/wc-product-functions.php 1026-1034
return (array) apply_filters(
	'product_type_selector',
	array(
		ProductType::SIMPLE   => __( 'Simple product', 'woocommerce' ),
		ProductType::GROUPED  => __( 'Grouped product', 'woocommerce' ),
		ProductType::EXTERNAL => __( 'External/Affiliate product', 'woocommerce' ),
		ProductType::VARIABLE => __( 'Variable product', 'woocommerce' ),
	)
);

Where the hook is used in WooCommerce

Usage not found.