Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #357 from OKAMca/bugfix/remove-deprecated-term-fun…
Browse files Browse the repository at this point in the history
…ction

fix(term): removing deprecated resolve_term_object function
  • Loading branch information
jasonbahl authored Sep 21, 2023
2 parents 05636ef + 574153f commit 50574f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/class-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -903,11 +903,11 @@ protected function register_graphql_field( string $type_name, string $field_name
*/
if ( ! empty( $value ) && is_array( $value ) ) {
foreach ( $value as $term ) {
$terms[] = DataSource::resolve_term_object( (int) $term, $context );
$terms[] = $context->get_loader( 'term' )->load_deferred( (int) $term );
}
return $terms;
} else {
return DataSource::resolve_term_object( (int) $value, $context );
return $context->get_loader( 'term' )->load_deferred( (int) $value );
}
},
];
Expand Down

0 comments on commit 50574f2

Please sign in to comment.