WC_GZD_Units

The Units Class stores units/measurements data.

Defined (1)

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

/includes/class-wc-gzd-units.php  
  1. class WC_GZD_Units extends WC_GZD_Taxonomy { 
  2.  
  3. /** 
  4. * Adds the units from i18n template 
  5. */ 
  6. public function __construct() { 
  7. parent::__construct( 'product_unit' ); 
  8.  
  9. public function get_unit( $key, $by = 'slug' ) { 
  10. return parent::get_term( $key, $by ); 
  11.  
  12. /** 
  13. * Returns mixed units array 
  14. * @return mixed units as array 
  15. */ 
  16. public function get_units() { 
  17. return $this->get_terms();