Question

How to get tracking information from order shipment in magento 2?

Was it helpful?

Solution

You can get all tracking details using this code :

$tracksCollection = $order->getTracksCollection();

foreach ($tracksCollection->getItems() as $track) {

     echo $track->getTrackNumber(); // Tracking number
     // You can get other details here.

}
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top