From 809f2925e8f472415e13304789db4da118cfe639 Mon Sep 17 00:00:00 2001 From: Geoff Taylor Date: Tue, 10 Nov 2020 12:15:24 -0500 Subject: [PATCH] support added for externally defined product type queries. --- includes/type/object/class-root-query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/type/object/class-root-query.php b/includes/type/object/class-root-query.php index 9e7df17d..2bb84013 100644 --- a/includes/type/object/class-root-query.php +++ b/includes/type/object/class-root-query.php @@ -406,7 +406,7 @@ class Root_Query { // Product queries $product_types = apply_filters( 'woographql_register_product_queries', - array( 'simple', 'variable', 'external', 'group' ) + array_keys( \WP_GraphQL_WooCommerce::get_enabled_product_types() ) ); foreach( $product_types as $type ) { $field_name = "{$type}Product";