created the wc_get_product_types() function
This commit is contained in:
parent
0e623e2c50
commit
276ebd25e3
|
@ -493,3 +493,18 @@ function wc_track_product_view() {
|
|||
}
|
||||
|
||||
add_action( 'template_redirect', 'wc_track_product_view', 20 );
|
||||
|
||||
/**
|
||||
* Get product types
|
||||
*
|
||||
* @since 2.2
|
||||
* @return array
|
||||
*/
|
||||
function wc_get_product_types() {
|
||||
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' )
|
||||
) );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue