diff --git a/src/Controllers/ShippingController.php b/src/Controllers/ShippingController.php index 3a4679f..acf931b 100644 --- a/src/Controllers/ShippingController.php +++ b/src/Controllers/ShippingController.php @@ -719,9 +719,11 @@ public function getLabels(Request $request, $orderIds) /** @var OrderShippingPackage $result */ foreach ($results as $result) { - if ($this->storageRepository->doesObjectExist('ShippingTutorial', $result->packageId.'.pdf')) + $labelKey = explode('/', $result->labelPath)[1]; + + if ($this->storageRepository->doesObjectExist('ShippingTutorial', $labelKey)) { - $storageObject = $this->storageRepository->getObject('ShippingTutorial', $result->packageId.'.pdf'); + $storageObject = $this->storageRepository->getObject('ShippingTutorial', $labelKey); $labels[] = $storageObject->body; } }