Magento 2 order shipment tracking details
-
15-04-2021 - |
Domanda
How to get tracking information from order shipment in magento 2?
Soluzione
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.
}
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a magento.stackexchange