Skip to content

Commit 9c4241e

Browse files
committed
Correct validation of shipping method input in resolver
Correlates to the schema changes made: magento/graphql-ce@fa5613b
1 parent 5c3cb17 commit 9c4241e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/code/Magento/QuoteGraphQl/Model/Resolver/SetShippingMethodsOnCart.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
7272
if (!$shippingMethod['cart_address_id']) {
7373
throw new GraphQlInputException(__('Required parameter "cart_address_id" is missing'));
7474
}
75-
if (!$shippingMethod['shipping_carrier_code']) {
75+
if (!$shippingMethod['carrier_code']) {
7676
throw new GraphQlInputException(__('Required parameter "shipping_carrier_code" is missing'));
7777
}
78-
if (!$shippingMethod['shipping_method_code']) {
78+
if (!$shippingMethod['method_code']) {
7979
throw new GraphQlInputException(__('Required parameter "shipping_method_code" is missing'));
8080
}
8181

@@ -85,8 +85,8 @@ public function resolve(Field $field, $context, ResolveInfo $info, array $value
8585
$this->setShippingMethodOnCart->execute(
8686
$cart,
8787
$shippingMethod['cart_address_id'],
88-
$shippingMethod['shipping_carrier_code'],
89-
$shippingMethod['shipping_method_code']
88+
$shippingMethod['carrier_code'],
89+
$shippingMethod['method_code']
9090
);
9191

9292
return [

0 commit comments

Comments
 (0)