Skip to content

Commit

Permalink
added getCustomerDetailByOrderUuid to Convertim
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasLudvik committed Oct 30, 2024
1 parent 5b507d4 commit 54ab015
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/Model/Customer/BillingAddress.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,12 @@ public function getUuid()
{
return $this->uuid;
}

/**
* @return bool
*/
public function isBillingAddressFilled(): bool
{
return $this->street !== null && $this->city !== null && $this->postcode !== null && $this->country !== null;
}
}
2 changes: 1 addition & 1 deletion src/Model/Customer/User/CustomerUserUpdateDataFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ protected function getAmendedBillingAddressDataByOrder(Order $order, BillingAddr
{
$billingAddressData = $this->billingAddressDataFactory->createFromBillingAddress($billingAddress);

if ($billingAddress->getStreet() === null) {
if (!$billingAddress->isBillingAddressFilled()) {
$this->fillBillingAddressDataFromOrder($order, $billingAddressData);
}

Expand Down

0 comments on commit 54ab015

Please sign in to comment.