WCML_Compatibility_Helper

The WooCommerce Multilingual WCML Compatibility Helper class.

Defined (1)

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

/compatibility/class-wcml-compatibility-helper.php  
  1. class WCML_Compatibility_Helper{ 
  2.  
  3. function get_product_type($product_id) { 
  4.  
  5. if ( $terms = wp_get_object_terms( $product_id, 'product_type' ) ) { 
  6. $product_type = sanitize_title( current( $terms )->name ); 
  7. } else { 
  8. $product_type = apply_filters( 'default_product_type', 'simple' ); 
  9.  
  10. return $product_type; 
  11.  
  12.