Fix wc_get_weight warning with PHP 7.1

This commit is contained in:
Manos Psychogyiopoulos 2017-04-19 12:35:40 +03:00
parent d94f3883da
commit 6392582d16
1 changed files with 1 additions and 0 deletions

View File

@ -165,6 +165,7 @@ function wc_get_dimension( $dimension, $to_unit, $from_unit = '' ) {
* @return float
*/
function wc_get_weight( $weight, $to_unit, $from_unit = '' ) {
$weight = (float) $weight;
$to_unit = strtolower( $to_unit );
if ( empty( $from_unit ) ) {