From b1f9cfa661ad917c63b672fd057256df50f31ed4 Mon Sep 17 00:00:00 2001 From: Geoff Taylor Date: Tue, 7 Apr 2020 14:56:33 -0400 Subject: [PATCH] "shippingMethod" field type changed to [String]. --- includes/mutation/class-checkout.php | 2 +- tests/acceptance/NewCustomerCheckingOutCept.php | 2 +- tests/wpunit/CheckoutMutationsTest.php | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) 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',