How to get tracking information from order shipment in magento 2?
1 Answer
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.
}
vendor/magento/module-sales/view/frontend/email/shipment_new.html