I want to fetch all shipping details on the checkout_onepage_controller_success_action event.
I am using the following code:
$event = $observer->getEvent();
$orderIds = $event->getOrderIds();
$order_id = $orderIds[0];
$shipping = $order_id->getShippingAddress()->getData();
$shippingMethod = $order_id->getShippingMethod();
And I'm getting the error:
Error: Call to a member function getShippingAddress() on string.
According to me the way of passing $order_id on getShippingAddress() is wrong. Can someone brief me on the same? I want to fetch complete data across order id.