wc_get_product_types

Get product types.

Description

(array) wc_get_product_types(); 

Returns (array)


Usage

  1. if ( !function_exists( 'wc_get_product_types' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-product-functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wc_get_product_types(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-product-functions.php  
  1. function wc_get_product_types() { 
  2. return (array) apply_filters( 'product_type_selector', array( 
  3. 'simple' => __( 'Simple product', woocommerce ),  
  4. 'grouped' => __( 'Grouped product', woocommerce ),  
  5. 'external' => __( 'External/Affiliate product', woocommerce ),  
  6. 'variable' => __( 'Variable product', woocommerce ),  
  7. ) );