created the wc_get_product_types() function

This commit is contained in:
claudiosmweb 2014-06-24 13:59:56 -03:00
parent 0e623e2c50
commit 276ebd25e3
1 changed files with 15 additions and 0 deletions

View File

@ -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' )
) );
}