Skip to content

Commit e396c01

Browse files
author
Prabhu Ram
committed
MC-31586: Customer address is duplicated after setBillingAddressOnCart GraphQL mutation.
- review fixes
1 parent 8a92d80 commit e396c01

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/code/Magento/QuoteGraphQl/Model/Cart/SetBillingAddressOnCart.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ private function createBillingAddress(
118118

119119
$customerId = $context->getUserId();
120120
// need to save address only for registered user and if save_in_address_book = true
121+
// and address is not same as shipping
121122
if (0 !== $customerId
122123
&& isset($addressInput['save_in_address_book'])
123124
&& (bool)$addressInput['save_in_address_book'] && !$sameAsShipping

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Customer/SetBillingAddressOnCartTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ public function testSetBillingAddressAndPlaceOrder()
894894
street: ["test street 1", "test street 2"]
895895
city: "test city"
896896
region: "AZ"
897-
postcode: "887766"
897+
postcode: "88776"
898898
country_code: "US"
899899
telephone: "88776655"
900900
save_in_address_book: true

0 commit comments

Comments
 (0)