From c269d64c6c10a067181ff1fa3cefe5680226e365 Mon Sep 17 00:00:00 2001 From: vnmedeiros Date: Tue, 22 Oct 2019 00:02:39 -0300 Subject: [PATCH] add `hide_empty` on support like query #318 --- src/api/class-tainacan-rest-controller.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/class-tainacan-rest-controller.php b/src/api/class-tainacan-rest-controller.php index db4cd0e58..780405db3 100644 --- a/src/api/class-tainacan-rest-controller.php +++ b/src/api/class-tainacan-rest-controller.php @@ -165,6 +165,7 @@ class REST_Controller extends \WP_REST_Controller { $terms = get_terms([ 'taxonomy' => $tax_query['taxonomy'], 'fields' => 'ids', + 'hide_empty' => false, 'search' => $tax_query['terms'] ]); @@ -179,6 +180,7 @@ class REST_Controller extends \WP_REST_Controller { $terms = get_terms([ 'taxonomy' => $tax_query['taxonomy'], 'fields' => 'ids', + 'hide_empty' => false, 'search' => $tax_query['terms'] ]); if ($terms) {