Fixed undefined method WC_Order_Item_Product::get_qty()

This commit is contained in:
Claudio Sanches 2016-11-18 06:08:00 -02:00
parent f5a228509a
commit 65c9a1b26b
2 changed files with 2 additions and 2 deletions

View File

@ -230,7 +230,7 @@ class WC_API_Orders extends WC_API_Resource {
'total' => wc_format_decimal( $order->get_line_total( $item, false, false ), $dp ),
'total_tax' => wc_format_decimal( $item->get_total_tax(), $dp ),
'price' => wc_format_decimal( $order->get_item_total( $item, false, false ), $dp ),
'quantity' => $item->get_qty(),
'quantity' => $item->get_quantity(),
'tax_class' => $item->get_tax_class(),
'name' => $item->get_name(),
'product_id' => $item->get_variation_id() ? $item->get_variation_id() : $item->get_product_id(),

View File

@ -236,7 +236,7 @@ class WC_API_Orders extends WC_API_Resource {
'total' => wc_format_decimal( $order->get_line_total( $item, false, false ), $dp ),
'total_tax' => wc_format_decimal( $item->get_total_tax(), $dp ),
'price' => wc_format_decimal( $order->get_item_total( $item, false, false ), $dp ),
'quantity' => $item->get_qty(),
'quantity' => $item->get_quantity(),
'tax_class' => $item->get_tax_class(),
'name' => $item->get_name(),
'product_id' => $item->get_variation_id() ? $item->get_variation_id() : $item->get_product_id(),