Skip to content

Commit 03b8ff8

Browse files
authored
Merge pull request #257 from kidunot89/bugfix/checkout-shipping-methods
"shippingMethod" field type changed to [String].
2 parents 37db69b + fc5dcfa commit 03b8ff8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

includes/mutation/class-checkout.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public static function get_input_fields() {
5050
'description' => __( 'Payment method ID.', 'wp-graphql-woocommerce' ),
5151
),
5252
'shippingMethod' => array(
53-
'type' => 'String',
53+
'type' => array( 'list_of' => 'String' ),
5454
'description' => __( 'Order shipping method', 'wp-graphql-woocommerce' ),
5555
),
5656
'shipToDifferentAddress' => array(

tests/acceptance/NewCustomerCheckingOutCept.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
$checkout_input = array(
160160
'clientMutationId' => 'someId',
161161
'paymentMethod' => 'bacs',
162-
'shippingMethod' => 'flat rate',
162+
'shippingMethod' => array( 'flat rate' ),
163163
'billing' => array(
164164
'firstName' => 'May',
165165
'lastName' => 'Parker',

tests/wpunit/CheckoutMutationsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ public function testCheckoutOrderMutation() {
278278
$input = array(
279279
'clientMutationId' => 'someId',
280280
'paymentMethod' => 'bacs',
281-
'shippingMethod' => 'flat rate',
281+
'shippingMethod' => array( 'flat rate' ),
282282
'billing' => array(
283283
'firstName' => 'May',
284284
'lastName' => 'Parker',
@@ -484,7 +484,7 @@ public function testCheckoutOrderMutationWithNewAccount() {
484484
$input = array(
485485
'clientMutationId' => 'someId',
486486
'paymentMethod' => 'bacs',
487-
'shippingMethod' => 'flat rate',
487+
'shippingMethod' => array( 'flat rate' ),
488488
'billing' => array(
489489
'firstName' => 'May',
490490
'lastName' => 'Parker',
@@ -676,7 +676,7 @@ public function testCheckoutOrderMutationWithNoAccount() {
676676
$input = array(
677677
'clientMutationId' => 'someId',
678678
'paymentMethod' => 'bacs',
679-
'shippingMethod' => 'flat rate',
679+
'shippingMethod' => array( 'flat rate' ),
680680
'billing' => array(
681681
'firstName' => 'May',
682682
'lastName' => 'Parker',
@@ -880,7 +880,7 @@ public function testCheckoutOrderMutationWithPrepaidOrder() {
880880
'paymentMethod' => 'bacs',
881881
'isPaid' => true,
882882
'transactionId' => 'transaction_id',
883-
'shippingMethod' => 'flat rate',
883+
'shippingMethod' => array( 'flat rate' ),
884884
'billing' => array(
885885
'firstName' => 'May',
886886
'lastName' => 'Parker',

0 commit comments

Comments
 (0)