layer nav using list OR was not displaying any terms fixes #4911

This commit is contained in:
splashingpixels 2014-02-22 13:42:13 -08:00 committed by Coen Jacobs
parent 1386625dae
commit a653bfa64b
1 changed files with 3 additions and 8 deletions

View File

@ -266,12 +266,7 @@ class WC_Widget_Layered_Nav extends WC_Widget {
// If this is an OR query, show all options so search can be expanded // If this is an OR query, show all options so search can be expanded
} else { } else {
$filtered_product_ids_excluding_self = array(); $count = sizeof( array_intersect( $_products_in_term, WC()->query->unfiltered_product_ids ) );
foreach ( WC()->query->filtered_product_ids_for_taxonomy as $attribute => $ids )
if ( $attribute !== $taxonomy )
$filtered_product_ids_excluding_self = array_merge( $filtered_product_ids_excluding_self, $ids );
$count = sizeof( array_intersect( $_products_in_term, $filtered_product_ids_excluding_self ) );
if ( $count > 0 ) if ( $count > 0 )
$found = true; $found = true;