woocommerce_get_weight

The WooCommerce woocommerce get weight function.

Description

woocommerce_get_weight( $weight, $to_unit ); 

Parameters (2)

0. $weight
The weight.
1. $to_unit
The to unit.

Usage

  1. if ( !function_exists( 'woocommerce_get_weight' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-deprecated-functions.php'; 
  3.  
  4. // The weight. 
  5. $weight = null; 
  6.  
  7. // The to unit. 
  8. $to_unit = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = woocommerce_get_weight($weight, $to_unit); 
  12.  

Defined (1)

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

/includes/wc-deprecated-functions.php  
  1. function woocommerce_get_weight( $weight, $to_unit ) { 
  2. wc_deprecated_function( __FUNCTION__, '3.0', 'wc_get_weight' ); 
  3. return wc_get_weight( $weight, $to_unit );