product_type_selector filter-hookWC 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 628-636
return (array) apply_filters(
	'product_type_selector',
	array(
		'simple'   => __( 'Simple product', 'woocommerce' ),
		'grouped'  => __( 'Grouped product', 'woocommerce' ),
		'external' => __( 'External/Affiliate product', 'woocommerce' ),
		'variable' => __( 'Variable product', 'woocommerce' ),
	)
);

Where the hook is used in WooCommerce

Usage not found.