From 7ffd418bffa55901f55b069ff8bf0e0e5e662d4c Mon Sep 17 00:00:00 2001 From: Geoff Taylor Date: Fri, 27 Mar 2020 12:18:06 -0400 Subject: [PATCH] Deprecated "By" queries removed. More connection resolver cleanup. --- composer.json | 2 +- includes/connection/class-coupons.php | 2 +- includes/connection/class-orders.php | 2 +- includes/connection/class-products.php | 2 +- includes/connection/class-refunds.php | 2 +- ...pe-args.php => wc-cpt-connection-args.php} | 6 +- .../class-cart-item-connection-resolver.php | 14 ++-- .../class-coupon-connection-resolver.php | 4 +- .../class-customer-connection-resolver.php | 19 ++--- ...-downloadable-item-connection-resolver.php | 9 ++- .../class-order-connection-resolver.php | 4 +- .../class-product-connection-resolver.php | 4 +- .../class-refund-connection-resolver.php | 4 +- ...ons.php => trait-wc-cpt-loader-common.php} | 64 ++--------------- .../connection/trait-wc-db-loader-common.php | 40 +++++++++++ includes/data/loader/class-wc-cpt-loader.php | 20 +++--- includes/data/loader/class-wc-db-loader.php | 4 -- includes/type/interface/class-product.php | 69 ------------------- includes/type/object/class-coupon-type.php | 64 ----------------- tests/wpunit/ProductQueriesTest.php | 11 +-- vendor/composer/autoload_classmap.php | 3 +- vendor/composer/autoload_files.php | 2 +- vendor/composer/autoload_static.php | 5 +- 23 files changed, 107 insertions(+), 249 deletions(-) rename includes/connection/{common-post-type-args.php => wc-cpt-connection-args.php} (89%) rename includes/data/connection/{trait-wc-connection-functions.php => trait-wc-cpt-loader-common.php} (63%) create mode 100644 includes/data/connection/trait-wc-db-loader-common.php diff --git a/composer.json b/composer.json index 6de2bcc5..9b660078 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ }, "autoload": { "files":[ - "includes/connection/common-post-type-args.php", + "includes/connection/wc-cpt-connection-args.php", "includes/functions.php" ], "psr-4": { diff --git a/includes/connection/class-coupons.php b/includes/connection/class-coupons.php index 23b5c509..3bdbc544 100644 --- a/includes/connection/class-coupons.php +++ b/includes/connection/class-coupons.php @@ -65,7 +65,7 @@ class Coupons { */ public static function get_connection_args(): array { return array_merge( - get_common_post_type_args(), + get_wc_cpt_connection_args(), array( 'code' => array( 'type' => 'String', diff --git a/includes/connection/class-orders.php b/includes/connection/class-orders.php index b4620293..270c1fbd 100644 --- a/includes/connection/class-orders.php +++ b/includes/connection/class-orders.php @@ -72,7 +72,7 @@ class Orders { switch ( $access ) { case 'private': return array_merge( - get_common_post_type_args(), + get_wc_cpt_connection_args(), array( 'statuses' => array( 'type' => array( 'list_of' => 'OrderStatusEnum' ), diff --git a/includes/connection/class-products.php b/includes/connection/class-products.php index bfc0b079..1bf42d0a 100644 --- a/includes/connection/class-products.php +++ b/includes/connection/class-products.php @@ -274,6 +274,6 @@ class Products { ); } - return array_merge( get_common_post_type_args(), $args ); + return array_merge( get_wc_cpt_connection_args(), $args ); } } diff --git a/includes/connection/class-refunds.php b/includes/connection/class-refunds.php index 2a26538a..a868ee7b 100644 --- a/includes/connection/class-refunds.php +++ b/includes/connection/class-refunds.php @@ -66,7 +66,7 @@ class Refunds { */ public static function get_connection_args(): array { return array_merge( - get_common_post_type_args(), + get_wc_cpt_connection_args(), array( 'statuses' => array( 'type' => array( 'list_of' => 'String' ), diff --git a/includes/connection/common-post-type-args.php b/includes/connection/wc-cpt-connection-args.php similarity index 89% rename from includes/connection/common-post-type-args.php rename to includes/connection/wc-cpt-connection-args.php index a29be73d..3be57e61 100644 --- a/includes/connection/common-post-type-args.php +++ b/includes/connection/wc-cpt-connection-args.php @@ -1,6 +1,6 @@ array( 'type' => 'String', diff --git a/includes/data/connection/class-cart-item-connection-resolver.php b/includes/data/connection/class-cart-item-connection-resolver.php index 8be6a878..8b500f81 100644 --- a/includes/data/connection/class-cart-item-connection-resolver.php +++ b/includes/data/connection/class-cart-item-connection-resolver.php @@ -22,9 +22,9 @@ use WPGraphQL\WooCommerce\Data\Factory; */ class Cart_Item_Connection_Resolver extends AbstractConnectionResolver { /** - * Include shared connection functions. + * Include Db Loader connection common functions. */ - use WC_Connection_Functions; + use WC_Db_Loader_Common; const PREFIX = 'CI'; @@ -132,8 +132,7 @@ class Cart_Item_Connection_Resolver extends AbstractConnectionResolver { /** * Create cursor for downloadable item node. * - * @param array $node Cart item. - * @param string $key Cart item key. + * @param string $id Cart item key. * * @return string */ @@ -151,14 +150,15 @@ class Cart_Item_Connection_Resolver extends AbstractConnectionResolver { } /** - * Wrapper for "WC_Connection_Functions::is_valid_cart_item_offset()" + * Check if cart item key is valid by confirming the validity of + * the cart item in the cart encoded into cart item key. * - * @param integer $offset Post ID. + * @param string $offset Cart item key. * * @return bool */ public function is_valid_offset( $offset ) { - return $this->is_valid_cart_item_offset( $offset ); + return ! empty( $this->source->get_cart_item( $offset ) ); } /** diff --git a/includes/data/connection/class-coupon-connection-resolver.php b/includes/data/connection/class-coupon-connection-resolver.php index 5ad42e42..795cdbfd 100644 --- a/includes/data/connection/class-coupon-connection-resolver.php +++ b/includes/data/connection/class-coupon-connection-resolver.php @@ -21,9 +21,9 @@ use WPGraphQL\Extension\WooCommerce\Model\Coupon; */ class Coupon_Connection_Resolver extends AbstractConnectionResolver { /** - * Include shared connection functions. + * Include CPT Loader connection common functions. */ - use WC_Connection_Functions; + use WC_CPT_Loader_Common; /** * The name of the post type, or array of post types the connection resolver is resolving for diff --git a/includes/data/connection/class-customer-connection-resolver.php b/includes/data/connection/class-customer-connection-resolver.php index 0b22da53..5e923809 100644 --- a/includes/data/connection/class-customer-connection-resolver.php +++ b/includes/data/connection/class-customer-connection-resolver.php @@ -18,11 +18,6 @@ use WPGraphQL\WooCommerce\Model\Coupon; * Class Customer_Connection_Resolver */ class Customer_Connection_Resolver extends AbstractConnectionResolver { - /** - * Include shared connection functions. - */ - use WC_Connection_Functions; - /** * Return the name of the loader to be used with the connection resolver * @@ -224,13 +219,21 @@ class Customer_Connection_Resolver extends AbstractConnectionResolver { } /** - * Wrapper for "WC_Connection_Functions::is_valid_user_offset()" + * Determine whether or not the the offset is valid, i.e the user corresponding to the offset exists. + * Offset is equivalent to user_id. So this function is equivalent + * to checking if the user with the given ID exists. * - * @param integer $offset User ID. + * @param integer $offset User ID. * * @return bool */ public function is_valid_offset( $offset ) { - return $this->is_valid_user_offset( $offset ); + global $wpdb; + + if ( ! empty( wp_cache_get( $offset, 'users' ) ) ) { + return true; + } + + return $wpdb->get_var( $wpdb->prepare( "SELECT EXISTS (SELECT 1 FROM $wpdb->users WHERE ID = %d)", $offset ) ); } } diff --git a/includes/data/connection/class-downloadable-item-connection-resolver.php b/includes/data/connection/class-downloadable-item-connection-resolver.php index d1044528..fa254580 100644 --- a/includes/data/connection/class-downloadable-item-connection-resolver.php +++ b/includes/data/connection/class-downloadable-item-connection-resolver.php @@ -23,9 +23,9 @@ use WPGraphQL\WooCommerce\Model\Customer; */ class Downloadable_Item_Connection_Resolver extends AbstractConnectionResolver { /** - * Include shared connection functions. + * Include Db Loader connection common functions. */ - use WC_Connection_Functions; + use WC_Db_Loader_Common; const PREFIX = 'DI'; @@ -172,8 +172,7 @@ class Downloadable_Item_Connection_Resolver extends AbstractConnectionResolver { /** * Create cursor for downloadable item node. * - * @param array $node Cart item. - * @param string $key Cart item key. + * @param string $id Downloadable item ID. * * @return string */ @@ -211,7 +210,7 @@ class Downloadable_Item_Connection_Resolver extends AbstractConnectionResolver { * * @return bool */ - protected function is_valid_model( array $model ) { + protected function is_valid_model( $model ) { return isset( $model ) && ! empty( $model['download_id'] ); } } diff --git a/includes/data/connection/class-order-connection-resolver.php b/includes/data/connection/class-order-connection-resolver.php index e784a2aa..5485e230 100644 --- a/includes/data/connection/class-order-connection-resolver.php +++ b/includes/data/connection/class-order-connection-resolver.php @@ -21,9 +21,9 @@ use WPGraphQL\WooCommerce\Model\Order; */ class Order_Connection_Resolver extends AbstractConnectionResolver { /** - * Include shared connection functions. + * Include CPT Loader connection common functions. */ - use WC_Connection_Functions; + use WC_CPT_Loader_Common; /** * The name of the post type, or array of post types the connection resolver is resolving for diff --git a/includes/data/connection/class-product-connection-resolver.php b/includes/data/connection/class-product-connection-resolver.php index 0bb159a3..0cea820a 100644 --- a/includes/data/connection/class-product-connection-resolver.php +++ b/includes/data/connection/class-product-connection-resolver.php @@ -24,9 +24,9 @@ use WPGraphQL\WooCommerce\Model\Product_Variation; */ class Product_Connection_Resolver extends AbstractConnectionResolver { /** - * Include shared connection functions. + * Include CPT Loader connection common functions. */ - use WC_Connection_Functions; + use WC_CPT_Loader_Common; /** * The name of the post type, or array of post types the connection resolver is resolving for diff --git a/includes/data/connection/class-refund-connection-resolver.php b/includes/data/connection/class-refund-connection-resolver.php index 37257ab6..99019751 100644 --- a/includes/data/connection/class-refund-connection-resolver.php +++ b/includes/data/connection/class-refund-connection-resolver.php @@ -22,9 +22,9 @@ use WPGraphQL\WooCommerce\Model\Refund; */ class Refund_Connection_Resolver extends AbstractConnectionResolver { /** - * Include shared connection functions. + * Include CPT Loader connection common functions. */ - use WC_Connection_Functions; + use WC_CPT_Loader_Common; /** * The name of the post type, or array of post types the connection resolver is resolving for diff --git a/includes/data/connection/trait-wc-connection-functions.php b/includes/data/connection/trait-wc-cpt-loader-common.php similarity index 63% rename from includes/data/connection/trait-wc-connection-functions.php rename to includes/data/connection/trait-wc-cpt-loader-common.php index 3e7edd3a..f3d883d2 100644 --- a/includes/data/connection/trait-wc-connection-functions.php +++ b/includes/data/connection/trait-wc-cpt-loader-common.php @@ -1,9 +1,9 @@ get_var( $wpdb->prepare( "SELECT EXISTS (SELECT 1 FROM $wpdb->posts WHERE ID = %d)", $offset ) ); } - /** - * Determine whether or not the the offset is valid, i.e the cart item corresponding to the offset exists. - * Offset is equivalent to a cart item key. So this function is equivalent - * to checking if the cart item with the given key exists. - * - * @param string $offset Cart item key. - * - * @return bool - */ - public function is_valid_cart_item_offset( $offset ) { - return ! empty( $this->source->get_cart_item( $offset ) ); - } - - /** - * Determine whether or not the the offset is valid, i.e the user corresponding to the offset exists. - * Offset is equivalent to user_id. So this function is equivalent - * to checking if the user with the given ID exists. - * - * @param integer $offset User ID. - * - * @return bool - */ - public function is_valid_user_offset( $offset ) { - global $wpdb; - - if ( ! empty( wp_cache_get( $offset, 'users' ) ) ) { - return true; - } - - return $wpdb->get_var( $wpdb->prepare( "SELECT EXISTS (SELECT 1 FROM $wpdb->users WHERE ID = %d)", $offset ) ); - } - /** * Sanitizes common post-type connection query input. * @@ -148,28 +116,4 @@ trait WC_Connection_Functions { public function get_cpt_model_by_id( $id ) { return $this->loader->resolve_model( get_post_type( $id ), $id ); } - - /** - * Given an offset and prefix, a cursor is returned - * - * @param string $prefix Salt. - * @param string|integer $offset Connection offset. - * - * @return string - */ - protected function offset_to_cursor( $prefix, $offset ) { - return base64_encode( "{$prefix}:{$offset}" ); - } - - /** - * Given a valid cursor and prefix, the offset is returned - * - * @param string $prefix Salt. - * @param string $cursor Cursor. - * - * @return string|integer - */ - protected function cursor_to_offset( $prefix, $cursor ) { - return substr( base64_decode( $cursor ), strlen( $prefix . ':' ) ); - } } diff --git a/includes/data/connection/trait-wc-db-loader-common.php b/includes/data/connection/trait-wc-db-loader-common.php new file mode 100644 index 00000000..50c09bc9 --- /dev/null +++ b/includes/data/connection/trait-wc-db-loader-common.php @@ -0,0 +1,40 @@ +context->getLoader( 'wc_customer' )->buffer( [ $customer_id ] ); - } - } elseif ( 'product_variation' === $post_type || 'shop_refund' === $post_type ) { - $parent_id = get_post_field( 'post_parent', $key ); - $this->buffer( [ $parent_id ] ); + switch ( $post_type ) { + case 'shop_order': + $customer_id = get_post_meta( $key, '_customer_user', true ); + if ( ! empty( $customer_id ) ) { + $this->context->getLoader( 'wc_customer' )->buffer( [ $customer_id ] ); + } + break; + case 'product_variation': + case 'shop_refund': + $parent_id = get_post_field( 'post_parent', $key ); + $this->buffer( [ $parent_id ] ); + break; } /** diff --git a/includes/data/loader/class-wc-db-loader.php b/includes/data/loader/class-wc-db-loader.php index aa1d65df..101a7e95 100644 --- a/includes/data/loader/class-wc-db-loader.php +++ b/includes/data/loader/class-wc-db-loader.php @@ -143,10 +143,6 @@ class WC_Db_Loader extends AbstractDataLoader { return new Tax_Rate( $rate ); } else { return null; - // throw new UserError( - // /* translators: %s: Tax rate ID */ - // sprintf( __( 'No Tax Rate assigned to ID %s was found ', 'wp-graphql-woocommerce' ), $id ) - // ); } } } diff --git a/includes/type/interface/class-product.php b/includes/type/interface/class-product.php index e24a56fc..5dac38c5 100644 --- a/includes/type/interface/class-product.php +++ b/includes/type/interface/class-product.php @@ -103,75 +103,6 @@ class Product { }, ) ); - - /** - * DEPRECATED - * - * Will be removed in v0.5.x. - */ - register_graphql_field( - 'RootQuery', - 'productBy', - array( - 'type' => 'Product', - 'isDeprecated' => true, - 'deprecationReason' => __( - 'This query has been deprecation, and will be removed in v0.5.x. Please use "product(id: value, idType: DATABASE_ID|SLUG|SKU)" instead', - 'wp-graphql-woocommerce' - ), - 'description' => __( 'A product object', 'wp-graphql-woocommerce' ), - 'args' => array( - 'id' => array( - 'type' => 'ID', - 'description' => __( 'Get the product by its global ID', 'wp-graphql-woocommerce' ), - ), - 'productId' => array( - 'type' => 'Int', - 'description' => __( 'Get the product by its database ID', 'wp-graphql-woocommerce' ), - ), - 'slug' => array( - 'type' => 'String', - 'description' => __( 'Get the product by its slug', 'wp-graphql-woocommerce' ), - ), - 'sku' => array( - 'type' => 'String', - 'description' => __( 'Get the product by its sku', 'wp-graphql-woocommerce' ), - ), - ), - 'resolve' => function ( $source, array $args, AppContext $context ) { - $product_id = 0; - $id_type = ''; - if ( ! empty( $args['id'] ) ) { - $id_components = Relay::fromGlobalId( $args['id'] ); - if ( empty( $id_components['id'] ) || empty( $id_components['type'] ) ) { - throw new UserError( __( 'The "id" is invalid', 'wp-graphql-woocommerce' ) ); - } - $product_id = absint( $id_components['id'] ); - $id_type = 'ID'; - } elseif ( ! empty( $args['productId'] ) ) { - $product_id = absint( $args['productId'] ); - $id_type = 'product ID'; - } elseif ( ! empty( $args['slug'] ) ) { - $post = get_page_by_path( $args['slug'], OBJECT, 'product' ); - $product_id = ! empty( $post ) ? absint( $post->ID ) : 0; - $id_type = 'slug'; - } elseif ( ! empty( $args['sku'] ) ) { - $product_id = \wc_get_product_id_by_sku( $args['sku'] ); - $id_type = 'sku'; - } - - if ( empty( $product_id ) ) { - /* translators: %1$s: ID type, %2$s: ID value */ - throw new UserError( sprintf( __( 'No product ID was found corresponding to the %1$s: %2$s', 'wp-graphql-woocommerce' ), $id_type, $product_id ) ); - } elseif ( get_post( $product_id )->post_type !== 'product' ) { - /* translators: %1$s: ID type, %2$s: ID value */ - throw new UserError( sprintf( __( 'No product exists with the %1$s: %2$s', 'wp-graphql-woocommerce' ), $id_type, $product_id ) ); - } - - return Factory::resolve_crud_object( $product_id, $context ); - }, - ) - ); } /** diff --git a/includes/type/object/class-coupon-type.php b/includes/type/object/class-coupon-type.php index a91f55e6..97b8db6a 100644 --- a/includes/type/object/class-coupon-type.php +++ b/includes/type/object/class-coupon-type.php @@ -157,69 +157,5 @@ class Coupon_Type { }, ) ); - - /** - * DEPRECATED - * - * Will be removed in v0.5.x. - */ - register_graphql_field( - 'RootQuery', - 'couponBy', - array( - 'type' => 'Coupon', - 'description' => __( 'A coupon object', 'wp-graphql-woocommerce' ), - 'isDeprecated' => true, - 'deprecationReason' => __( - 'This query has been deprecation, and will be removed in v0.5.x. Please use "coupon(id: value, idType: DATABASE_ID|CODE)" instead', - 'wp-graphql-woocommerce' - ), - 'args' => array( - 'id' => array( - 'type' => 'ID', - 'description' => __( 'Get the coupon by its global ID', 'wp-graphql-woocommerce' ), - ), - 'couponId' => array( - 'type' => 'Int', - 'description' => __( 'Get the coupon by its database ID', 'wp-graphql-woocommerce' ), - ), - 'code' => array( - 'type' => 'String', - 'description' => __( 'Get the coupon by its code', 'wp-graphql-woocommerce' ), - ), - ), - 'resolve' => function( $source, array $args, AppContext $context ) { - $coupon_id = null; - if ( ! empty( $args['id'] ) ) { - $id_components = Relay::fromGlobalId( $args['id'] ); - if ( empty( $id_components['id'] ) || empty( $id_components['type'] ) ) { - throw new UserError( __( 'The "id" is invalid', 'wp-graphql-woocommerce' ) ); - } - - $coupon_id = absint( $id_components['id'] ); - $id = $args['id']; - $id_type = 'ID'; - } elseif ( ! empty( $args['couponId'] ) ) { - $coupon_id = absint( $args['couponId'] ); - $id = $args['couponId']; - $id_type = 'DATABASE_ID'; - } elseif ( ! empty( $args['code'] ) ) { - $coupon_id = \wc_get_coupon_id_by_code( $args['code'] ); - $id = $args['code']; - $id_type = 'CODE'; - } - - if ( empty( $coupon_id ) ) { - /* translators: %1$s: ID type, %2$s: ID value */ - throw new UserError( sprintf( __( 'No coupon ID was found corresponding to the %1$s: %2$s', 'wp-graphql-woocommerce' ), $id_type, $id ) ); - } elseif ( get_post( $coupon_id )->post_type !== 'shop_coupon' ) { - /* translators: %1$s: ID type, %2$s: ID value */ - throw new UserError( sprintf( __( 'No coupon exists with the %1$s: %2$s', 'wp-graphql-woocommerce' ), $id_type, $id ) ); - } - - return Factory::resolve_crud_object( $coupon_id, $context ); - }, - ) - ); } } diff --git a/tests/wpunit/ProductQueriesTest.php b/tests/wpunit/ProductQueriesTest.php index f608cf6d..71b04f86 100644 --- a/tests/wpunit/ProductQueriesTest.php +++ b/tests/wpunit/ProductQueriesTest.php @@ -182,8 +182,8 @@ class ProductQueriesTest extends \Codeception\TestCase\WPTestCase { ); $query = ' - query ( $id: ID, $productId: Int, $slug: String, $sku: String ) { - productBy( id: $id, productId: $productId, slug: $slug, sku: $sku ) { + query ( $id: ID!, $idType: ProductIdTypeEnum ) { + product( id: $id, idType: $idType ) { ... on SimpleProduct { id image { @@ -214,11 +214,14 @@ class ProductQueriesTest extends \Codeception\TestCase\WPTestCase { * * Test querying product with "productId" argument. */ - $variables = array( 'productId' => $product ); + $variables = array( + 'id' => $product, + 'idType' => 'DATABASE_ID' + ); $actual = graphql( array( 'query' => $query, 'variables' => $variables ) ); $expected = array( 'data' => array( - 'productBy' => array( + 'product' => array( 'id' => $this->helper->to_relay_id( $product ), 'image' => array( 'id' => \GraphQLRelay\Relay::toGlobalId( 'attachment', $attachment_id ), diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index bbad8564..7c6127c3 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -43,7 +43,8 @@ return array( 'WPGraphQL\\WooCommerce\\Data\\Connection\\Shipping_Method_Connection_Resolver' => $baseDir . '/includes/data/connection/class-shipping-method-connection-resolver.php', 'WPGraphQL\\WooCommerce\\Data\\Connection\\Tax_Rate_Connection_Resolver' => $baseDir . '/includes/data/connection/class-tax-rate-connection-resolver.php', 'WPGraphQL\\WooCommerce\\Data\\Connection\\Variation_Attribute_Connection_Resolver' => $baseDir . '/includes/data/connection/class-variation-attribute-connection-resolver.php', - 'WPGraphQL\\WooCommerce\\Data\\Connection\\WC_Connection_Functions' => $baseDir . '/includes/data/connection/trait-wc-connection-functions.php', + 'WPGraphQL\\WooCommerce\\Data\\Connection\\WC_CPT_Loader_Common' => $baseDir . '/includes/data/connection/trait-wc-cpt-loader-common.php', + 'WPGraphQL\\WooCommerce\\Data\\Connection\\WC_Db_Loader_Common' => $baseDir . '/includes/data/connection/trait-wc-db-loader-common.php', 'WPGraphQL\\WooCommerce\\Data\\Connection\\WC_Term_Connection_Resolver' => $baseDir . '/includes/data/connection/class-wc-term-connection-resolver.php', 'WPGraphQL\\WooCommerce\\Data\\Factory' => $baseDir . '/includes/data/class-factory.php', 'WPGraphQL\\WooCommerce\\Data\\Loader\\WC_CPT_Loader' => $baseDir . '/includes/data/loader/class-wc-cpt-loader.php', diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index aef00ef4..c7c1484a 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -6,6 +6,6 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - '914b07b8cf678ed0b81bfdb5d23b4f2b' => $baseDir . '/includes/connection/common-post-type-args.php', + '944484f100dc1864a5320474d49ebd5a' => $baseDir . '/includes/connection/wc-cpt-connection-args.php', '45a15019e901000ab8608c03ebff44fb' => $baseDir . '/includes/functions.php', ); diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index e8ddc313..154a75e2 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -7,7 +7,7 @@ namespace Composer\Autoload; class ComposerStaticInit605a02cd7bfd584c6ac9e4f2b4d51817 { public static $files = array ( - '914b07b8cf678ed0b81bfdb5d23b4f2b' => __DIR__ . '/../..' . '/includes/connection/common-post-type-args.php', + '944484f100dc1864a5320474d49ebd5a' => __DIR__ . '/../..' . '/includes/connection/wc-cpt-connection-args.php', '45a15019e901000ab8608c03ebff44fb' => __DIR__ . '/../..' . '/includes/functions.php', ); @@ -71,7 +71,8 @@ class ComposerStaticInit605a02cd7bfd584c6ac9e4f2b4d51817 'WPGraphQL\\WooCommerce\\Data\\Connection\\Shipping_Method_Connection_Resolver' => __DIR__ . '/../..' . '/includes/data/connection/class-shipping-method-connection-resolver.php', 'WPGraphQL\\WooCommerce\\Data\\Connection\\Tax_Rate_Connection_Resolver' => __DIR__ . '/../..' . '/includes/data/connection/class-tax-rate-connection-resolver.php', 'WPGraphQL\\WooCommerce\\Data\\Connection\\Variation_Attribute_Connection_Resolver' => __DIR__ . '/../..' . '/includes/data/connection/class-variation-attribute-connection-resolver.php', - 'WPGraphQL\\WooCommerce\\Data\\Connection\\WC_Connection_Functions' => __DIR__ . '/../..' . '/includes/data/connection/trait-wc-connection-functions.php', + 'WPGraphQL\\WooCommerce\\Data\\Connection\\WC_CPT_Loader_Common' => __DIR__ . '/../..' . '/includes/data/connection/trait-wc-cpt-loader-common.php', + 'WPGraphQL\\WooCommerce\\Data\\Connection\\WC_Db_Loader_Common' => __DIR__ . '/../..' . '/includes/data/connection/trait-wc-db-loader-common.php', 'WPGraphQL\\WooCommerce\\Data\\Connection\\WC_Term_Connection_Resolver' => __DIR__ . '/../..' . '/includes/data/connection/class-wc-term-connection-resolver.php', 'WPGraphQL\\WooCommerce\\Data\\Factory' => __DIR__ . '/../..' . '/includes/data/class-factory.php', 'WPGraphQL\\WooCommerce\\Data\\Loader\\WC_CPT_Loader' => __DIR__ . '/../..' . '/includes/data/loader/class-wc-cpt-loader.php',