Skip to content

Commit 5ad9605

Browse files
committed
graphQl-509: save_in_address_book has no impact on Address Book
1 parent 271e0b9 commit 5ad9605

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

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

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,26 @@ public function execute(ContextInterface $context, array $shippingAddressInput):
7272
);
7373
}
7474

75+
$shippingAddress = $this->createShippingAddress($context, $customerAddressId, $addressInput);
76+
77+
return $shippingAddress;
78+
}
79+
80+
/**
81+
* Create shipping address.
82+
*
83+
* @param ContextInterface $context
84+
* @param int|null $customerAddressId
85+
* @param array|null $addressInput
86+
*
87+
* @return \Magento\Quote\Model\Quote\Address
88+
* @throws GraphQlAuthorizationException
89+
*/
90+
private function createShippingAddress(
91+
ContextInterface $context,
92+
?int $customerAddressId,
93+
?array $addressInput
94+
) {
7595
$customerId = $context->getUserId();
7696

7797
if (null === $customerAddressId) {

0 commit comments

Comments
 (0)