How to get order details based on order item id using simple way. I can get the order id from sales_order_item table and then can lookup in sales_order table to fetch sales order details. Is there a direct way to fetch order details by using \Magento\Sales\Model\Order using order item id
1 Answer
There is no direct way to load Order Object using Order Item Id.
But if you Load Order Item Object using Item Id then you can directly get the Order Object using function getOrder
you can check this getOrder
function in Magento\Sales\Model\Order\Item
class.