Update (For WooCommerce 3+). Now for the code you can use WC_Order_Item_Product (and WC_Product ) methods instead, like:
As a WooCommerce development freelancer, every day I repeat many coding
To update the order item quantity, you can use WC_Order_Item_Product set_quantity() method. The correct hook to update order items (line ...
shipping // for products only: echo $order_item->get_quantity(); // or $order_item['quantity']; echo ...
Maximum Order Qty – Customer must purchase no more than this quantity of items to checkout. Minimum Order Value – Customer's cart contents must cost more ...
get_quantity(). includes/class-wc-order-item.php : 137. Get quantity.
it is showing 1 also whereas the the actual quantity of the item in the order is 5.
Cart Line Item Quantity: Quantities are based on the individual cart item.
object $product = $item->get_product(); // get the quantity $ product_quantity
includes/class-wc-order-item-product.php : 15