Merge pull request #168 from woocommerce/PCP-136-product-quantity-not-being-turne

Cast item `get_quantity` into `int`
This commit is contained in:
Emili Castells 2021-05-26 11:45:09 +02:00 committed by GitHub
commit 4859980b88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -91,7 +91,7 @@ class ItemFactory {
*
* @var \WC_Product $product
*/
$quantity = $item->get_quantity();
$quantity = (int) $item->get_quantity();
$price = (float) $order->get_item_subtotal( $item, true );
$price_without_tax = (float) $order->get_item_subtotal( $item, false );