Merge pull request #13560 from JeroenSormani/php71-typecast-fix

Type cast ->get_weight() on WC_Cart::get_cart_contents_weight calcula…
This commit is contained in:
Mike Jolley 2017-03-13 16:10:47 +00:00 committed by GitHub
commit 19759a83b4
1 changed files with 1 additions and 1 deletions

View File

@ -358,7 +358,7 @@ class WC_Cart {
$weight = 0;
foreach ( $this->get_cart() as $cart_item_key => $values ) {
$weight += $values['data']->get_weight() * $values['quantity'];
$weight += (float) $values['data']->get_weight() * $values['quantity'];
}
return apply_filters( 'woocommerce_cart_contents_weight', $weight );