diff --git a/includes/type/object/class-cart-type.php b/includes/type/object/class-cart-type.php index b8a86110..e2c15747 100644 --- a/includes/type/object/class-cart-type.php +++ b/includes/type/object/class-cart-type.php @@ -136,6 +136,7 @@ class Cart_Type { 'description' => __( 'Available shipping methods for this order.', 'wp-graphql-woocommerce' ), 'resolve' => function() { $packages = array(); + foreach ( \WC()->shipping()->calculate_shipping( \WC()->cart->get_shipping_packages() ) as $index => $package ) { $package['index'] = $index; $packages[] = $package; diff --git a/includes/type/object/class-shipping-rate-type.php b/includes/type/object/class-shipping-rate-type.php index bfb1b4bf..63f6540e 100644 --- a/includes/type/object/class-shipping-rate-type.php +++ b/includes/type/object/class-shipping-rate-type.php @@ -39,7 +39,7 @@ class Shipping_Rate_Type { }, ), 'instanceId' => array( - 'type' => array( 'non_null' => 'Int' ), + 'type' => 'Int', 'description' => __( 'Shipping instance ID', 'wp-graphql-woocommerce' ), 'resolve' => function ( $source ) { return ! empty( $source->get_instance_id() ) ? $source->get_instance_id() : null; diff --git a/wp-graphql-woocommerce.php b/wp-graphql-woocommerce.php index 23ed5fb0..8b244431 100644 --- a/wp-graphql-woocommerce.php +++ b/wp-graphql-woocommerce.php @@ -23,7 +23,6 @@ // Exit if accessed directly. defined( 'ABSPATH' ) || exit; -define( 'GRAPHQL_DEBUG', true ); /** * If the codeception remote coverage file exists, require it. *