Skip to content

Commit 924bbf5

Browse files
committed
Fixes 3200, tests pass
1 parent 8465b58 commit 924bbf5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Data/Connection/TermObjectConnectionResolver.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ public function __construct( $source, array $args, AppContext $context, ResolveI
3535
*/
3636
protected function prepare_query_args( array $args ): array {
3737
$all_taxonomies = \WPGraphQL::get_allowed_taxonomies();
38-
$taxonomy = ! empty( $this->taxonomy ) && in_array( $this->taxonomy, $all_taxonomies, true ) ? [ $this->taxonomy ] : $all_taxonomies;
38+
39+
if ( ! is_array( $this->taxonomy ) ) {
40+
$taxonomy = ! empty( $this->taxonomy ) && in_array( $this->taxonomy, $all_taxonomies, true ) ? [ $this->taxonomy ] : $all_taxonomies;
41+
} else {
42+
$taxonomy = $this->taxonomy;
43+
}
3944

4045
if ( ! empty( $args['where']['taxonomies'] ) ) {
4146
/**

0 commit comments

Comments
 (0)