wc_get_product_tax_class_options

Get product tax class options.

Description

(array) wc_get_product_tax_class_options(); 

Returns (array)


Usage

  1. if ( !function_exists( 'wc_get_product_tax_class_options' ) ) { 
  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_tax_class_options(); 
  7.  

Defined (1)

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

/includes/wc-product-functions.php  
  1. function wc_get_product_tax_class_options() { 
  2. $tax_classes = WC_Tax::get_tax_classes(); 
  3. $tax_class_options = array(); 
  4. $tax_class_options[''] = __( 'Standard', woocommerce ); 
  5.  
  6. if ( ! empty( $tax_classes ) ) { 
  7. foreach ( $tax_classes as $class ) { 
  8. $tax_class_options[ sanitize_title( $class ) ] = $class; 
  9. return $tax_class_options;