diff --git a/.travis.yml b/.travis.yml index b4108dff..390d2809 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,17 +27,13 @@ cache: matrix: include: - php: 7.3 - env: PHP_VERSION=7.3 WP_VERSION=5.2 COVERAGE=1 + env: PHP_VERSION=7.3 WP_VERSION=5.3 - php: 7.3 env: PHP_VERSION=7.3 PHPCS=1 - php: 7.2 - env: PHP_VERSION=7.2 WP_VERSION=5.2 + env: PHP_VERSION=7.2 WP_VERSION=5.3 - php: 7.2 env: PHP_VERSION=7.2 WP_VERSION=4.9 - - php: 7.1 - env: PHP_VERSION=7.1 WP_VERSION=5.2 - - php: 7.1 - env: PHP_VERSION=7.1 WP_VERSION=4.9 - php: 7.0 env: PHP_VERSION=7.0 WP_VERSION=5.0 - php: 7.0 @@ -46,6 +42,10 @@ matrix: env: PHP_VERSION=5.6 WP_VERSION=5.0 - php: 5.6 env: PHP_VERSION=5.6 WP_VERSION=4.9 + - php: 7.1 + env: PHP_VERSION=7.1 WP_VERSION=5.3 + - php: 7.1 + env: PHP_VERSION=7.1 WP_VERSION=4.9 COVERAGE=1 allow_failures: - env: PHP_VERSION=5.6 WP_VERSION=5.0 - env: PHP_VERSION=5.6 WP_VERSION=4.9 diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f5d484c..47dc2f59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,6 @@ [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.2.2-beta...v0.3.0-beta) -**Merged pull requests:** - -- Release-v0.2.2 [\#154](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/154) ([kidunot89](https://github.com/kidunot89)) - ## [v0.2.2-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.2.2-beta) (2019-10-24) [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.2.1-beta...v0.2.2-beta) @@ -16,9 +12,6 @@ - Sorting of products, Categories etc [\#138](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/138) - Accessing meta\_data product property? [\#121](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/121) -- Improved ordering for some connections [\#145](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/145) ([kidunot89](https://github.com/kidunot89)) -- "product\_connection\_catalog\_visibility" hook implemented. [\#142](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/142) ([kidunot89](https://github.com/kidunot89)) -- "format" arg added to Product description fields [\#139](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/139) ([kidunot89](https://github.com/kidunot89)) **Fixed:** @@ -27,10 +20,6 @@ - Extension breaks the hierarchy between pages [\#122](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/122) - Order id undefined [\#119](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/119) - categoryNameIn not filtering [\#116](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/116) -- Fixes product taxonomy hierachy resolution [\#150](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/150) ([kidunot89](https://github.com/kidunot89)) -- Adds WPGraphQL JWT Auth fields to Customer type and mutations [\#148](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/148) ([kidunot89](https://github.com/kidunot89)) -- Escape hatch added on non-GraphQL requests. [\#146](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/146) ([kidunot89](https://github.com/kidunot89)) -- Release v0.2.1 [\#114](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/114) ([kidunot89](https://github.com/kidunot89)) **Closed issues:** @@ -39,20 +28,10 @@ - Price Type, and name not showing up for product as Typed values [\#137](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/137) - Add AND and OR statement to where clause. [\#120](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/120) -**Merged pull requests:** - -- FUNDING.yml added. [\#151](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/151) ([kidunot89](https://github.com/kidunot89)) -- CONTRIBUTING.md added [\#144](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/144) ([kidunot89](https://github.com/kidunot89)) -- v0.2.1 hotfix to develop [\#135](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/135) ([kidunot89](https://github.com/kidunot89)) - ## [v0.2.1-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.2.1-beta) (2019-08-27) [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.2.0-beta...v0.2.1-beta) -**Breaking changes:** - -- Release v0.2.0 [\#96](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/96) ([kidunot89](https://github.com/kidunot89)) - **Enhancements:** - Hooks for mutations [\#108](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/108) @@ -65,7 +44,6 @@ - customerRegister mutation resolves wrong object for `viewer` field [\#111](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/111) - I cant see the category thumbnail [\#93](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/93) -- Session header bugfix [\#113](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/113) ([kidunot89](https://github.com/kidunot89)) ## [v0.2.0-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.2.0-beta) (2019-07-11) @@ -74,24 +52,15 @@ **Fixed:** - Custom attributes of variable products cannot be queried. [\#87](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/87) -- Release v0.1.2 [\#86](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/86) ([kidunot89](https://github.com/kidunot89)) **Closed issues:** - Customer id doesn't match user id [\#90](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/90) -**Merged pull requests:** - -- CHANGELOG updated [\#92](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/92) ([kidunot89](https://github.com/kidunot89)) - ## [v0.1.2-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.1.2-beta) (2019-06-23) [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.1.1-beta...v0.1.2-beta) -**Fixed:** - -- Release v0.1.1 [\#81](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/81) ([kidunot89](https://github.com/kidunot89)) - **Closed issues:** - Tests needed [\#46](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/46) @@ -100,10 +69,6 @@ [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.1.0-beta...v0.1.1-beta) -**Breaking changes:** - -- Release v0.1.0 [\#54](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/54) ([kidunot89](https://github.com/kidunot89)) - **Enhancements:** - Add format argument to product pricing fields [\#75](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/75) @@ -113,7 +78,6 @@ **Fixed:** - Provide guest user authentication [\#79](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/79) -- Codeception versioning problem in Travis-CI build [\#77](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/77) ([kidunot89](https://github.com/kidunot89)) **Closed issues:** @@ -127,10 +91,6 @@ - Release v0.0.4 Summary [\#66](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/66) -**Merged pull requests:** - -- Release v0.0.4 [\#65](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/65) ([kidunot89](https://github.com/kidunot89)) - ## [v0.0.4-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.0.4-beta) (2019-05-10) [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.0.3-beta...v0.0.4-beta) @@ -140,40 +100,23 @@ - Add filter for restricted\_cap in models [\#51](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/51) - Add name to ProductVariation [\#41](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/41) - Cart type and queries [\#12](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/12) -- Adds "\*\_restricted\_cap" filters [\#53](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/53) ([kidunot89](https://github.com/kidunot89)) -- ProductAttribute completion [\#50](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/50) ([kidunot89](https://github.com/kidunot89)) **Fixed:** - Query products by categories returns an empty array. [\#44](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/44) -- More ProductVariation fields [\#49](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/49) ([kidunot89](https://github.com/kidunot89)) -- Bugfix/\#44 [\#45](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/45) ([kidunot89](https://github.com/kidunot89)) - -**Merged pull requests:** - -- to v0.0.3 [\#43](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/43) ([kidunot89](https://github.com/kidunot89)) ## [v0.0.3-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.0.3-beta) (2019-04-25) [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/v0.0.2-beta...v0.0.3-beta) -**Enhancements:** - -- Cart-type and queries and customer query [\#30](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/30) ([kidunot89](https://github.com/kidunot89)) - **Fixed:** - Pagination broken [\#29](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/29) -- Pagination fix for CPT-backed CRUD objects connections [\#36](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/36) ([kidunot89](https://github.com/kidunot89)) **Closed issues:** - Unsetting "object\_ids" on all connections [\#39](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/39) -**Merged pull requests:** - -- Master [\#35](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/35) ([kidunot89](https://github.com/kidunot89)) - ## [v0.0.2-beta](https://github.com/wp-graphql/wp-graphql-woocommerce/tree/v0.0.2-beta) (2019-04-22) [Full Changelog](https://github.com/wp-graphql/wp-graphql-woocommerce/compare/0db77c26ab463e6203df99eed2679f79ce3e4d60...v0.0.2-beta) @@ -182,22 +125,10 @@ - TaxClass type [\#27](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/27) - Order-Item type queries [\#13](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/13) -- Order items, TaxRate, and ShippingMethod [\#28](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/28) ([kidunot89](https://github.com/kidunot89)) -- Where args for Coupon, Order, and Refund connections [\#24](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/24) ([kidunot89](https://github.com/kidunot89)) -- Testing and CI renovation [\#21](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/21) ([kidunot89](https://github.com/kidunot89)) -- WPGraphQL v0.3.0 migration [\#9](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/9) ([kidunot89](https://github.com/kidunot89)) **Fixed:** - no queries work [\#31](https://github.com/wp-graphql/wp-graphql-woocommerce/issues/31) -- after\_success script added [\#32](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/32) ([kidunot89](https://github.com/kidunot89)) -- Polishing Product types and connections [\#22](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/22) ([kidunot89](https://github.com/kidunot89)) - -**Merged pull requests:** - -- Formatting code to WordPress Coding Standards [\#8](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/8) ([kidunot89](https://github.com/kidunot89)) -- Feature/Product type [\#7](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/7) ([kidunot89](https://github.com/kidunot89)) -- Feature/coupon type [\#6](https://github.com/wp-graphql/wp-graphql-woocommerce/pull/6) ([kidunot89](https://github.com/kidunot89)) diff --git a/composer.json b/composer.json index 9d595c30..6b89dc6e 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,8 @@ }, "autoload": { "files":[ - "includes/connection/common-post-type-args.php" + "includes/connection/common-post-type-args.php", + "includes/functions.php" ], "psr-4": { "WPGraphQL\\WooCommerce\\": "includes/" diff --git a/includes/class-wp-graphql-woocommerce.php b/includes/class-wp-graphql-woocommerce.php index 2f15dc4a..6939ab64 100644 --- a/includes/class-wp-graphql-woocommerce.php +++ b/includes/class-wp-graphql-woocommerce.php @@ -156,6 +156,9 @@ if ( ! class_exists( 'WP_GraphQL_WooCommerce' ) ) : * Sets up WooGraphQL schema. */ private function setup() { + // Setup minor integrations. + \WPGraphQL\WooCommerce\Functions\setup_minor_integrations(); + // Register WooCommerce filters. \WPGraphQL\WooCommerce\WooCommerce_Filters::add_filters(); diff --git a/includes/data/class-factory.php b/includes/data/class-factory.php index 7e11f103..4af5d44e 100644 --- a/includes/data/class-factory.php +++ b/includes/data/class-factory.php @@ -28,6 +28,7 @@ use WPGraphQL\WooCommerce\Data\Connection\Shipping_Method_Connection_Resolver; use WPGraphQL\WooCommerce\Data\Connection\Cart_Item_Connection_Resolver; use WPGraphQL\WooCommerce\Data\Connection\Payment_Gateway_Connection_Resolver; use WPGraphQL\WooCommerce\Model\Order_Item; +use WPGraphQL\WooCommerce\Model\Product; use WPGraphQL\WooCommerce\Model\Tax_Rate; use WPGraphQL\WooCommerce\Model\Shipping_Method; diff --git a/includes/functions.php b/includes/functions.php new file mode 100644 index 00000000..1629146d --- /dev/null +++ b/includes/functions.php @@ -0,0 +1,49 @@ + $baseDir . '/includes/connection/common-post-type-args.php', + '45a15019e901000ab8608c03ebff44fb' => $baseDir . '/includes/functions.php', ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index e882512d..5917c944 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInitc4b9a49460c76b4cc43bf4338672996b +class ComposerAutoloaderInitcece0dfed0b70a4b4547c45015505517 { private static $loader; @@ -19,15 +19,15 @@ class ComposerAutoloaderInitc4b9a49460c76b4cc43bf4338672996b return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitc4b9a49460c76b4cc43bf4338672996b', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInitcece0dfed0b70a4b4547c45015505517', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitc4b9a49460c76b4cc43bf4338672996b', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitcece0dfed0b70a4b4547c45015505517', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require_once __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInitc4b9a49460c76b4cc43bf4338672996b::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInitcece0dfed0b70a4b4547c45015505517::getInitializer($loader)); } else { $map = require __DIR__ . '/autoload_namespaces.php'; foreach ($map as $namespace => $path) { @@ -48,19 +48,19 @@ class ComposerAutoloaderInitc4b9a49460c76b4cc43bf4338672996b $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInitc4b9a49460c76b4cc43bf4338672996b::$files; + $includeFiles = Composer\Autoload\ComposerStaticInitcece0dfed0b70a4b4547c45015505517::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequirec4b9a49460c76b4cc43bf4338672996b($fileIdentifier, $file); + composerRequirecece0dfed0b70a4b4547c45015505517($fileIdentifier, $file); } return $loader; } } -function composerRequirec4b9a49460c76b4cc43bf4338672996b($fileIdentifier, $file) +function composerRequirecece0dfed0b70a4b4547c45015505517($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index c2b8e7ab..983bce8a 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,10 +4,11 @@ namespace Composer\Autoload; -class ComposerStaticInitc4b9a49460c76b4cc43bf4338672996b +class ComposerStaticInitcece0dfed0b70a4b4547c45015505517 { public static $files = array ( '914b07b8cf678ed0b81bfdb5d23b4f2b' => __DIR__ . '/../..' . '/includes/connection/common-post-type-args.php', + '45a15019e901000ab8608c03ebff44fb' => __DIR__ . '/../..' . '/includes/functions.php', ); public static $prefixLengthsPsr4 = array ( @@ -147,9 +148,9 @@ class ComposerStaticInitc4b9a49460c76b4cc43bf4338672996b public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInitc4b9a49460c76b4cc43bf4338672996b::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInitc4b9a49460c76b4cc43bf4338672996b::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInitc4b9a49460c76b4cc43bf4338672996b::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInitcece0dfed0b70a4b4547c45015505517::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInitcece0dfed0b70a4b4547c45015505517::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInitcece0dfed0b70a4b4547c45015505517::$classMap; }, null, ClassLoader::class); }