Skip to content

Commit

Permalink
Tidy comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed Jul 13, 2023
1 parent 0a64258 commit 5eb1f0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/Customers.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ private function _saveAddressesFromOrder(Order $order): void
}
}

// @TODO Update the order record manually?
if ($newSourceBillingAddressId) {
$order->sourceBillingAddressId = $newSourceBillingAddressId;
}
Expand All @@ -363,6 +362,7 @@ private function _saveAddressesFromOrder(Order $order): void
$order->sourceShippingAddressId = $newSourceShippingAddressId;
}

// Manually update the order DB record to avoid looped element saves
if ($newSourceBillingAddressId || $newSourceShippingAddressId) {
\craft\commerce\records\Order::updateAll([
'sourceBillingAddressId' => $order->sourceBillingAddressId,
Expand Down

0 comments on commit 5eb1f0a

Please sign in to comment.