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

Commit

Permalink
fix(term): removing deprecated resolve_term_object function
Browse files Browse the repository at this point in the history
  • Loading branch information
yanmorinokamca committed May 5, 2023
1 parent 05636ef commit 574153f
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 574153f

Please sign in to comment.