Merge pull request #172 from kidunot89/feature/searchwp-integration

QL Search support added.
This commit is contained in:
Geoffrey K Taylor
2019-11-14 23:19:59 -05:00
committed by GitHub
10 changed files with 75 additions and 88 deletions
+6 -6
View File
@@ -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
-69
View File
@@ -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))
+2 -1
View File
@@ -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/"
@@ -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();
+1
View File
@@ -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;
+49
View File
@@ -0,0 +1,49 @@
<?php
/**
* Misc functions.
*
* @package WPGraphQL\WooCommerce
* @since 0.3.1
*/
namespace WPGraphQL\WooCommerce\Functions;
/**
* Initializes minor integrations with other WordPress plugins.
*/
function setup_minor_integrations() {
add_filter(
'graphql_swp_result_possible_types',
'WPGraphQL\WooCommerce\Functions\woographql_swp_result_possible_types',
10,
1
);
}
/**
* QL Search integration - Adds to product types to the SWPResult possible types
*
* @param array $type_names SWPResults possible types.
*
* @return array
*/
function woographql_swp_result_possible_types( $type_names ) {
if ( in_array( 'Product', $type_names, true ) ) {
$type_names = array_merge(
array_filter(
$type_names,
function( $type_name ) {
return 'Product' !== $type_name;
}
),
array(
'SimpleProduct',
'VariableProduct',
'GroupProduct',
'ExternalProduct',
)
);
}
return $type_names;
}
+1 -1
View File
@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitc4b9a49460c76b4cc43bf4338672996b::getLoader();
return ComposerAutoloaderInitcece0dfed0b70a4b4547c45015505517::getLoader();
+1
View File
@@ -7,4 +7,5 @@ $baseDir = dirname($vendorDir);
return array(
'914b07b8cf678ed0b81bfdb5d23b4f2b' => $baseDir . '/includes/connection/common-post-type-args.php',
'45a15019e901000ab8608c03ebff44fb' => $baseDir . '/includes/functions.php',
);
+7 -7
View File
@@ -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;
+5 -4
View File
@@ -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);
}