Merge pull request #14523 from franticpsyx/fix-wc-get-weight-notice-warning

[3.0.3] Fix PHP 7.1 `wc_get_weight` warning
This commit is contained in:
Claudiu Lodromanean 2017-04-19 10:15:53 -07:00 committed by GitHub
commit b13380d120
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 ) ) {