Skip to content

Commit

Permalink
Merge pull request #3015 from 10up/burhan/fix-2990
Browse files Browse the repository at this point in the history
Fix: Taxonomy Facet tree issue
  • Loading branch information
felipeelia authored Sep 22, 2022
2 parents 89370ba + efbb801 commit 2505838
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions includes/classes/Feature/Facets/Types/Taxonomy/Renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ public function render( $args, $instance ) {
* Get top of tree
*/
while ( true && $i < 10 ) {
if ( ! empty( $term->parent_slug ) ) {
$top_of_tree = $terms_by_slug[ $term->parent_slug ];
if ( ! empty( $term->parent_term->slug ) ) {
$top_of_tree = $terms_by_slug[ $term->parent_term->slug ];
} else {
break;
}
Expand Down

0 comments on commit 2505838

Please sign in to comment.