Skip to content

Commit 5e83ddf

Browse files
committed
Transform quote address country code to uppercase
Fixes magento/graphql-ce#658 Magento countryIds are uppercase and storing country_id as lowercase in quote address items can cause undesired behavior when the Directory module determines if a region is allowed for a given country. Specifically this check fails when fetching the region code for a quote address: https://github.com/magento/graphql-ce/blob/a2fc3b98bf52ff7741579d16042b9c6376ecebfc/app/code/Magento/Customer/Model/Address/AbstractAddress.php#L400
1 parent def6657 commit 5e83ddf

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public function execute(ContextInterface $context, CartInterface $cart, array $s
7474
}
7575

7676
if (null === $customerAddressId) {
77+
$addressInput['country_code'] = strtoupper($addressInput['country_code']);
7778
$shippingAddress = $this->quoteAddressFactory->createBasedOnInputData($addressInput);
7879
} else {
7980
$customer = $this->getCustomer->execute($context);

0 commit comments

Comments
 (0)