Skip to content

Commit

Permalink
Merge pull request #2913 from jonathanstegall/develop
Browse files Browse the repository at this point in the history
Change term objects in `format_hits_as_terms` to `WP_Term` instead of `stdClass`
  • Loading branch information
felipeelia authored Aug 2, 2022
2 parents 948b654 + 87232c5 commit 58d6488
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions includes/classes/Indexable/Term/QueryIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ protected function format_hits_as_terms( $terms, $new_terms, $query_vars ) {
}

$term->elasticsearch = true; // Super useful for debugging.
$term = new \WP_Term( $term ); // Necessary for WordPress actions that expect WP_Term as the object type.

if ( $term ) {
$new_terms[] = $term;
Expand Down

0 comments on commit 58d6488

Please sign in to comment.