Skip to content

Commit

Permalink
fix: street setter bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GytisZum committed Nov 28, 2023
1 parent d7522d0 commit 5308142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Service/API/ShipmentApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public function createShipment($addressId, ShipmentData $shipmentData, $orderId)
$parcel = $this->parcelShopService->getParcelShopByShopId($shipmentData->getSelectedPudoId());
$selectedParcel = is_array($parcel) ? reset($parcel) : $parcel;
$postCode = $selectedParcel->getPCode();
$address->address1 = $selectedParcel->getStreet();
}

// IF prestashop allows, we take selected parcel terminal address in case information is missing in checkout address in specific cases.
Expand Down Expand Up @@ -237,7 +238,6 @@ private function setNotRequiredData(ShipmentCreationRequest $shipmentCreationReq
private function setPudoData(ShipmentCreationRequest $shipmentCreationRequest, ShipmentData $shipmentData)
{
$shipmentCreationRequest->setParcelShopId($shipmentData->getSelectedPudoId());
$shipmentCreationRequest->setStreet($shipmentData->getDpdStreet());

return $shipmentCreationRequest;
}
Expand Down

0 comments on commit 5308142

Please sign in to comment.