diff --git a/includes/mutation/class-checkout.php b/includes/mutation/class-checkout.php index e7a03773..454b7dd4 100644 --- a/includes/mutation/class-checkout.php +++ b/includes/mutation/class-checkout.php @@ -50,7 +50,7 @@ class Checkout { 'description' => __( 'Payment method ID.', 'wp-graphql-woocommerce' ), ), 'shippingMethod' => array( - 'type' => 'String', + 'type' => array( 'list_of' => 'String' ), 'description' => __( 'Order shipping method', 'wp-graphql-woocommerce' ), ), 'shipToDifferentAddress' => array( diff --git a/tests/acceptance/NewCustomerCheckingOutCept.php b/tests/acceptance/NewCustomerCheckingOutCept.php index a4fa78f2..c66ed663 100644 --- a/tests/acceptance/NewCustomerCheckingOutCept.php +++ b/tests/acceptance/NewCustomerCheckingOutCept.php @@ -159,7 +159,7 @@ $I->wantTo('checkout'); $checkout_input = array( 'clientMutationId' => 'someId', 'paymentMethod' => 'bacs', - 'shippingMethod' => 'flat rate', + 'shippingMethod' => array( 'flat rate' ), 'billing' => array( 'firstName' => 'May', 'lastName' => 'Parker', diff --git a/tests/wpunit/CheckoutMutationsTest.php b/tests/wpunit/CheckoutMutationsTest.php index 45b90c32..2aaa4ca1 100644 --- a/tests/wpunit/CheckoutMutationsTest.php +++ b/tests/wpunit/CheckoutMutationsTest.php @@ -278,7 +278,7 @@ class CheckoutMutationsTest extends \Codeception\TestCase\WPTestCase { $input = array( 'clientMutationId' => 'someId', 'paymentMethod' => 'bacs', - 'shippingMethod' => 'flat rate', + 'shippingMethod' => array( 'flat rate' ), 'billing' => array( 'firstName' => 'May', 'lastName' => 'Parker', @@ -484,7 +484,7 @@ class CheckoutMutationsTest extends \Codeception\TestCase\WPTestCase { $input = array( 'clientMutationId' => 'someId', 'paymentMethod' => 'bacs', - 'shippingMethod' => 'flat rate', + 'shippingMethod' => array( 'flat rate' ), 'billing' => array( 'firstName' => 'May', 'lastName' => 'Parker', @@ -676,7 +676,7 @@ class CheckoutMutationsTest extends \Codeception\TestCase\WPTestCase { $input = array( 'clientMutationId' => 'someId', 'paymentMethod' => 'bacs', - 'shippingMethod' => 'flat rate', + 'shippingMethod' => array( 'flat rate' ), 'billing' => array( 'firstName' => 'May', 'lastName' => 'Parker', @@ -880,7 +880,7 @@ class CheckoutMutationsTest extends \Codeception\TestCase\WPTestCase { 'paymentMethod' => 'bacs', 'isPaid' => true, 'transactionId' => 'transaction_id', - 'shippingMethod' => 'flat rate', + 'shippingMethod' => array( 'flat rate' ), 'billing' => array( 'firstName' => 'May', 'lastName' => 'Parker',