Skip to content

Commit 41217be

Browse files
authored
Unset billing/shipping addresses save preference
1 parent a958585 commit 41217be

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/code/Magento/Braintree/Model/Paypal/Helper/QuoteUpdater.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ private function updateShippingAddress(Quote $quote, array $details)
130130
$shippingAddress->setCollectShippingRates(true);
131131

132132
$this->updateAddressData($shippingAddress, $details['shippingAddress']);
133+
134+
// PayPal's address supposes not saving against customer account
135+
$shippingAddress->setSaveInAddressBook(false);
136+
$shippingAddress->setSameAsBilling(false);
137+
$shippingAddress->unsCustomerAddressId();
133138
}
134139

135140
/**
@@ -152,6 +157,11 @@ private function updateBillingAddress(Quote $quote, array $details)
152157
$billingAddress->setFirstname($details['firstName']);
153158
$billingAddress->setLastname($details['lastName']);
154159
$billingAddress->setEmail($details['email']);
160+
161+
// PayPal's address supposes not saving against customer account
162+
$billingAddress->setSaveInAddressBook(false);
163+
$billingAddress->setSameAsBilling(false);
164+
$billingAddress->unsCustomerAddressId();
155165
}
156166

157167
/**

0 commit comments

Comments
 (0)