diff --git a/includes/class-actions.php b/includes/class-actions.php deleted file mode 100644 index 1c77dff16..000000000 --- a/includes/class-actions.php +++ /dev/null @@ -1,185 +0,0 @@ -cart; + do_action( 'woocommerce_graphql_before_empty_cart', $cloned_cart, $input, $context, $info ); + // Empty cart. \WC()->cart->empty_cart(); + do_action( 'woocommerce_graphql_after_empty_cart', $cloned_cart, $input, $context, $info ); + return array( 'cart' => $cloned_cart ); }; } diff --git a/includes/mutation/class-customer-register.php b/includes/mutation/class-customer-register.php index 19b338816..079fb55d5 100644 --- a/includes/mutation/class-customer-register.php +++ b/includes/mutation/class-customer-register.php @@ -11,10 +11,10 @@ use GraphQL\Error\UserError; use GraphQL\Type\Definition\ResolveInfo; use WPGraphQL\AppContext; -use WPGraphQL\Mutation\UserRegister; use WPGraphQL\Extensions\WooCommerce\Data\Mutation\Customer_Mutation; use WPGraphQL\Extensions\WooCommerce\Model\Customer; use WPGraphQL\Model\User; +use WPGraphQL\Mutation\UserRegister; /** * Class - Customer_Register diff --git a/includes/mutation/class-customer-update.php b/includes/mutation/class-customer-update.php index 4f71791d6..e43119c8c 100644 --- a/includes/mutation/class-customer-update.php +++ b/includes/mutation/class-customer-update.php @@ -11,10 +11,10 @@ use GraphQL\Error\UserError; use GraphQL\Type\Definition\ResolveInfo; use WPGraphQL\AppContext; -use WPGraphQL\Mutation\UserUpdate; use WPGraphQL\Extensions\WooCommerce\Data\Mutation\Customer_Mutation; use WPGraphQL\Extensions\WooCommerce\Model\Customer; use WPGraphQL\Model\User; +use WPGraphQL\Mutation\UserUpdate; /** * Class - Customer_Update diff --git a/includes/type/enum/class-product-types.php b/includes/type/enum/class-product-types.php index d5928a674..25854c1a9 100644 --- a/includes/type/enum/class-product-types.php +++ b/includes/type/enum/class-product-types.php @@ -8,8 +8,6 @@ namespace WPGraphQL\Extensions\WooCommerce\Type\WPEnum; -use WPGraphQL\Type\WPEnumType; - /** * Class Product_Types */ diff --git a/includes/type/enum/class-tax-class.php b/includes/type/enum/class-tax-class.php index 54d80efdd..179db8880 100644 --- a/includes/type/enum/class-tax-class.php +++ b/includes/type/enum/class-tax-class.php @@ -19,11 +19,11 @@ class Tax_Class { */ public static function register() { $values = array( - WPEnumType::get_safe_name( 'inherit cart' ) => array( + 'INHERIT_CART' => array( 'value' => 'inherit', 'description' => __( 'Inherits Tax class from cart', 'wp-graphql-woocommerce' ), ), - WPEnumType::get_safe_name( 'standard' ) => array( + 'STANDARD' => array( 'value' => '', 'description' => __( 'Standard Tax rate', 'wp-graphql-woocommerce' ), ), diff --git a/includes/type/object/class-cart-type.php b/includes/type/object/class-cart-type.php index 9d557a84f..2575bd0f9 100644 --- a/includes/type/object/class-cart-type.php +++ b/includes/type/object/class-cart-type.php @@ -12,9 +12,7 @@ use GraphQL\Error\UserError; use GraphQL\Type\Definition\ResolveInfo; -use GraphQLRelay\Relay; use WPGraphQL\AppContext; -use WPGraphQL\Type\WPObjectType; use WPGraphQL\Extensions\WooCommerce\Data\Factory; /** diff --git a/includes/type/object/class-product-attribute-type.php b/includes/type/object/class-product-attribute-type.php index e2c82ece4..aa6a5cb13 100644 --- a/includes/type/object/class-product-attribute-type.php +++ b/includes/type/object/class-product-attribute-type.php @@ -8,10 +8,6 @@ namespace WPGraphQL\Extensions\WooCommerce\Type\WPObject; -use WPGraphQL\Extensions\WooCommerce\Data\Factory; -use WPGraphQL\Data\DataSource; -use GraphQLRelay\Relay; - /** * Class Product_Attribute_Type */ diff --git a/includes/type/object/class-product-category-type.php b/includes/type/object/class-product-category-type.php index 93c2ba474..e5ab42d11 100644 --- a/includes/type/object/class-product-category-type.php +++ b/includes/type/object/class-product-category-type.php @@ -12,8 +12,6 @@ use WPGraphQL\AppContext; use WPGraphQL\Data\DataSource; -use WPGraphQL\Type\WPObjectType; -use WPGraphQL\Extensions\WooCommerce\Data\Factory; /** * Class - Product_Category_Type diff --git a/includes/type/object/class-product-download-type.php b/includes/type/object/class-product-download-type.php index 6d75656d5..1157d837e 100644 --- a/includes/type/object/class-product-download-type.php +++ b/includes/type/object/class-product-download-type.php @@ -10,10 +10,6 @@ namespace WPGraphQL\Extensions\WooCommerce\Type\WPObject; -use WPGraphQL\Extensions\WooCommerce\Data\Factory; -use WPGraphQL\Data\DataSource; -use GraphQLRelay\Relay; - /** * Class Product_Download_Type */ diff --git a/includes/type/object/class-product-variation-type.php b/includes/type/object/class-product-variation-type.php index c055c9d77..a395b25f0 100644 --- a/includes/type/object/class-product-variation-type.php +++ b/includes/type/object/class-product-variation-type.php @@ -15,9 +15,9 @@ use GraphQLRelay\Relay; use WPGraphQL\AppContext; use WPGraphQL\Data\DataSource; -use WPGraphQL\Type\WPObjectType; use WPGraphQL\Extensions\WooCommerce\Data\Factory; use WPGraphQL\Extensions\WooCommerce\Model\Product_Variation; +use WPGraphQL\Type\WPObjectType; /** * Class Product_Variation_Type diff --git a/includes/type/object/class-refund-type.php b/includes/type/object/class-refund-type.php index 06baf994d..621cdb567 100644 --- a/includes/type/object/class-refund-type.php +++ b/includes/type/object/class-refund-type.php @@ -15,9 +15,8 @@ use GraphQLRelay\Relay; use WPGraphQL\AppContext; use WPGraphQL\Data\DataSource; -use WPGraphQL\Type\WPObjectType; use WPGraphQL\Extensions\WooCommerce\Data\Factory; -use WPGraphQL\Extensions\WooCommerce\Model\Product_Variation; +use WPGraphQL\Type\WPObjectType; /** * Class Refund_Type @@ -103,11 +102,11 @@ public static function register() { ); $post_by_args = array( - 'id' => array( + 'id' => array( 'type' => 'ID', 'description' => __( 'Get the refund by its global ID', 'wp-graphql-woocommerce' ), ), - 'refundId' => array( + 'refundId' => array( 'type' => 'Int', 'description' => __( 'Get the refund by its database ID', 'wp-graphql-woocommerce' ), ), diff --git a/includes/type/object/class-shipping-method-type.php b/includes/type/object/class-shipping-method-type.php index bb4873610..debdd0c13 100644 --- a/includes/type/object/class-shipping-method-type.php +++ b/includes/type/object/class-shipping-method-type.php @@ -14,9 +14,9 @@ use GraphQL\Type\Definition\ResolveInfo; use GraphQLRelay\Relay; use WPGraphQL\AppContext; -use WPGraphQL\Type\WPObjectType; use WPGraphQL\Extensions\WooCommerce\Data\Factory; use WPGraphQL\Extensions\WooCommerce\Model\Shipping_Method; +use WPGraphQL\Type\WPObjectType; /** * Class Shipping_Method_Type diff --git a/includes/type/object/class-tax-rate-type.php b/includes/type/object/class-tax-rate-type.php index e060d3464..c2fee4a6d 100644 --- a/includes/type/object/class-tax-rate-type.php +++ b/includes/type/object/class-tax-rate-type.php @@ -14,9 +14,9 @@ use GraphQL\Type\Definition\ResolveInfo; use GraphQLRelay\Relay; use WPGraphQL\AppContext; -use WPGraphQL\Type\WPObjectType; use WPGraphQL\Extensions\WooCommerce\Data\Factory; use WPGraphQL\Extensions\WooCommerce\Model\Tax_Rate; +use WPGraphQL\Type\WPObjectType; /** * Class Tax_Rate_Type diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 8d1fadee3..dfa8f6e06 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -6,7 +6,6 @@ $baseDir = dirname($vendorDir); return array( - 'WPGraphQL\\Extensions\\WooCommerce\\Actions' => $baseDir . '/includes/class-actions.php', 'WPGraphQL\\Extensions\\WooCommerce\\Connection\\Cart_Items' => $baseDir . '/includes/connection/class-cart-items.php', 'WPGraphQL\\Extensions\\WooCommerce\\Connection\\Coupons' => $baseDir . '/includes/connection/class-coupons.php', 'WPGraphQL\\Extensions\\WooCommerce\\Connection\\Customers' => $baseDir . '/includes/connection/class-customers.php', @@ -21,6 +20,7 @@ 'WPGraphQL\\Extensions\\WooCommerce\\Connection\\Variation_Attributes' => $baseDir . '/includes/connection/class-variation-attributes.php', 'WPGraphQL\\Extensions\\WooCommerce\\Connection\\WC_Connection' => $baseDir . '/includes/connection/class-wc-connection.php', 'WPGraphQL\\Extensions\\WooCommerce\\Connection\\WC_Terms' => $baseDir . '/includes/connection/class-wc-terms.php', + 'WPGraphQL\\Extensions\\WooCommerce\\Core_Schema_Filters' => $baseDir . '/includes/class-core-schema-filters.php', 'WPGraphQL\\Extensions\\WooCommerce\\Data\\Connection\\Cart_Item_Connection_Resolver' => $baseDir . '/includes/data/connection/class-cart-item-connection-resolver.php', 'WPGraphQL\\Extensions\\WooCommerce\\Data\\Connection\\Coupon_Connection_Resolver' => $baseDir . '/includes/data/connection/class-coupon-connection-resolver.php', 'WPGraphQL\\Extensions\\WooCommerce\\Data\\Connection\\Customer_Connection_Resolver' => $baseDir . '/includes/data/connection/class-customer-connection-resolver.php', @@ -42,7 +42,6 @@ 'WPGraphQL\\Extensions\\WooCommerce\\Data\\Mutation\\Checkout_Mutation' => $baseDir . '/includes/data/mutation/class-checkout-mutation.php', 'WPGraphQL\\Extensions\\WooCommerce\\Data\\Mutation\\Customer_Mutation' => $baseDir . '/includes/data/mutation/class-customer-mutation.php', 'WPGraphQL\\Extensions\\WooCommerce\\Data\\Mutation\\Order_Mutation' => $baseDir . '/includes/data/mutation/class-order-mutation.php', - 'WPGraphQL\\Extensions\\WooCommerce\\Filters' => $baseDir . '/includes/class-filters.php', 'WPGraphQL\\Extensions\\WooCommerce\\Model\\Coupon' => $baseDir . '/includes/model/class-coupon.php', 'WPGraphQL\\Extensions\\WooCommerce\\Model\\Crud_CPT' => $baseDir . '/includes/model/class-crud-cpt.php', 'WPGraphQL\\Extensions\\WooCommerce\\Model\\Customer' => $baseDir . '/includes/model/class-customer.php', @@ -108,6 +107,8 @@ 'WPGraphQL\\Extensions\\WooCommerce\\Type\\WPObject\\Shipping_Method_Type' => $baseDir . '/includes/type/object/class-shipping-method-type.php', 'WPGraphQL\\Extensions\\WooCommerce\\Type\\WPObject\\Tax_Rate_Type' => $baseDir . '/includes/type/object/class-tax-rate-type.php', 'WPGraphQL\\Extensions\\WooCommerce\\Type\\WPObject\\Variation_Attribute_Type' => $baseDir . '/includes/type/object/class-variation-attribute-type.php', + 'WPGraphQL\\Extensions\\WooCommerce\\Type_Registry' => $baseDir . '/includes/class-type-registry.php', 'WPGraphQL\\Extensions\\WooCommerce\\Utils\\QL_Session_Handler' => $baseDir . '/includes/utils/class-ql-session-handler.php', + 'WPGraphQL\\Extensions\\WooCommerce\\WooCommerce_Filters' => $baseDir . '/includes/class-woocommerce-filters.php', 'WP_GraphQL_WooCommerce' => $baseDir . '/includes/class-wp-graphql-woocommerce.php', ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 1e1649df5..fa09ad714 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -21,7 +21,6 @@ class ComposerStaticInitee0d17af17b841ed3a93c4a0e5cc5e5f ); public static $classMap = array ( - 'WPGraphQL\\Extensions\\WooCommerce\\Actions' => __DIR__ . '/../..' . '/includes/class-actions.php', 'WPGraphQL\\Extensions\\WooCommerce\\Connection\\Cart_Items' => __DIR__ . '/../..' . '/includes/connection/class-cart-items.php', 'WPGraphQL\\Extensions\\WooCommerce\\Connection\\Coupons' => __DIR__ . '/../..' . '/includes/connection/class-coupons.php', 'WPGraphQL\\Extensions\\WooCommerce\\Connection\\Customers' => __DIR__ . '/../..' . '/includes/connection/class-customers.php', @@ -36,6 +35,7 @@ class ComposerStaticInitee0d17af17b841ed3a93c4a0e5cc5e5f 'WPGraphQL\\Extensions\\WooCommerce\\Connection\\Variation_Attributes' => __DIR__ . '/../..' . '/includes/connection/class-variation-attributes.php', 'WPGraphQL\\Extensions\\WooCommerce\\Connection\\WC_Connection' => __DIR__ . '/../..' . '/includes/connection/class-wc-connection.php', 'WPGraphQL\\Extensions\\WooCommerce\\Connection\\WC_Terms' => __DIR__ . '/../..' . '/includes/connection/class-wc-terms.php', + 'WPGraphQL\\Extensions\\WooCommerce\\Core_Schema_Filters' => __DIR__ . '/../..' . '/includes/class-core-schema-filters.php', 'WPGraphQL\\Extensions\\WooCommerce\\Data\\Connection\\Cart_Item_Connection_Resolver' => __DIR__ . '/../..' . '/includes/data/connection/class-cart-item-connection-resolver.php', 'WPGraphQL\\Extensions\\WooCommerce\\Data\\Connection\\Coupon_Connection_Resolver' => __DIR__ . '/../..' . '/includes/data/connection/class-coupon-connection-resolver.php', 'WPGraphQL\\Extensions\\WooCommerce\\Data\\Connection\\Customer_Connection_Resolver' => __DIR__ . '/../..' . '/includes/data/connection/class-customer-connection-resolver.php', @@ -57,7 +57,6 @@ class ComposerStaticInitee0d17af17b841ed3a93c4a0e5cc5e5f 'WPGraphQL\\Extensions\\WooCommerce\\Data\\Mutation\\Checkout_Mutation' => __DIR__ . '/../..' . '/includes/data/mutation/class-checkout-mutation.php', 'WPGraphQL\\Extensions\\WooCommerce\\Data\\Mutation\\Customer_Mutation' => __DIR__ . '/../..' . '/includes/data/mutation/class-customer-mutation.php', 'WPGraphQL\\Extensions\\WooCommerce\\Data\\Mutation\\Order_Mutation' => __DIR__ . '/../..' . '/includes/data/mutation/class-order-mutation.php', - 'WPGraphQL\\Extensions\\WooCommerce\\Filters' => __DIR__ . '/../..' . '/includes/class-filters.php', 'WPGraphQL\\Extensions\\WooCommerce\\Model\\Coupon' => __DIR__ . '/../..' . '/includes/model/class-coupon.php', 'WPGraphQL\\Extensions\\WooCommerce\\Model\\Crud_CPT' => __DIR__ . '/../..' . '/includes/model/class-crud-cpt.php', 'WPGraphQL\\Extensions\\WooCommerce\\Model\\Customer' => __DIR__ . '/../..' . '/includes/model/class-customer.php', @@ -123,7 +122,9 @@ class ComposerStaticInitee0d17af17b841ed3a93c4a0e5cc5e5f 'WPGraphQL\\Extensions\\WooCommerce\\Type\\WPObject\\Shipping_Method_Type' => __DIR__ . '/../..' . '/includes/type/object/class-shipping-method-type.php', 'WPGraphQL\\Extensions\\WooCommerce\\Type\\WPObject\\Tax_Rate_Type' => __DIR__ . '/../..' . '/includes/type/object/class-tax-rate-type.php', 'WPGraphQL\\Extensions\\WooCommerce\\Type\\WPObject\\Variation_Attribute_Type' => __DIR__ . '/../..' . '/includes/type/object/class-variation-attribute-type.php', + 'WPGraphQL\\Extensions\\WooCommerce\\Type_Registry' => __DIR__ . '/../..' . '/includes/class-type-registry.php', 'WPGraphQL\\Extensions\\WooCommerce\\Utils\\QL_Session_Handler' => __DIR__ . '/../..' . '/includes/utils/class-ql-session-handler.php', + 'WPGraphQL\\Extensions\\WooCommerce\\WooCommerce_Filters' => __DIR__ . '/../..' . '/includes/class-woocommerce-filters.php', 'WP_GraphQL_WooCommerce' => __DIR__ . '/../..' . '/includes/class-wp-graphql-woocommerce.php', );