Skip to content

Commit a2c53d0

Browse files
committed
Fix bad merge
1 parent 463d477 commit a2c53d0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/elements/Order.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2339,7 +2339,7 @@ public function afterSave(bool $isNew): void
23392339
// If we only set the owner ID an element query will be triggered. If this is a brand-new order we will encounter an error
23402340
// This is because the order record has not been saved.
23412341
// We can avoid this by simply fully setting the owner on the address element. This is also a performance optimisation to avoid an extra query.
2342-
$billingAddress->setPrimaryOwner($this); // Always ensure the address is owned by the order
2342+
$estimatedShippingAddress->setPrimaryOwner($this); // Always ensure the address is owned by the order
23432343
Craft::$app->getElements()->saveElement($estimatedShippingAddress, false);
23442344
$orderRecord->estimatedShippingAddressId = $estimatedShippingAddress->id;
23452345
$this->setEstimatedShippingAddress($estimatedShippingAddress);

0 commit comments

Comments
 (0)