Skip to content

Commit 43f78cc

Browse files
ashishkumarpundeerashishkumarpundeer
authored andcommitted
AC-7550-V1::[2.4.5] Incorrect carrier/method code on selected shipping method in GraphQL
1 parent c7464fe commit 43f78cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/QuoteGraphQl/Model/Resolver/ShippingAddress/SelectedShippingMethod.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
5050
return null;
5151
}
5252

53-
list($carrierCode, $methodCode) = explode('_', $address->getShippingMethod(), 2);
54-
5553
/** @var Rate $rate */
5654
foreach ($rates as $rate) {
5755
if ($rate->getCode() === $address->getShippingMethod()) {
56+
$carrierCode = $rate->getCarrier();
57+
$methodCode = $rate->getMethod();
5858
break;
5959
}
6060
}

0 commit comments

Comments
 (0)