Magento 2 order shipment tracking details
-
15-04-2021 - |
Question
How to get tracking information from order shipment in magento 2?
La 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.
}
Licencié sous: CC-BY-SA avec attribution
Non affilié à magento.stackexchange