|
@@ 239-243 (lines=5) @@
|
| 236 |
|
$count = isset( $term_counts[ $term->term_id ] ) ? $term_counts[ $term->term_id ] : 0; |
| 237 |
|
|
| 238 |
|
// Only show options with count > 0 |
| 239 |
|
if ( 0 < $count ) { |
| 240 |
|
$found = true; |
| 241 |
|
} elseif ( 'and' === $query_type && 0 === $count && ! $option_is_set ) { |
| 242 |
|
continue; |
| 243 |
|
} |
| 244 |
|
|
| 245 |
|
echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( $option_is_set, true, false ) . '>' . esc_html( $term->name ) . '</option>'; |
| 246 |
|
} |
|
@@ 392-396 (lines=5) @@
|
| 389 |
|
} |
| 390 |
|
|
| 391 |
|
// Only show options with count > 0 |
| 392 |
|
if ( 0 < $count ) { |
| 393 |
|
$found = true; |
| 394 |
|
} elseif ( 'and' === $query_type && 0 === $count && ! $option_is_set ) { |
| 395 |
|
continue; |
| 396 |
|
} |
| 397 |
|
|
| 398 |
|
$filter_name = 'filter_' . sanitize_title( str_replace( 'pa_', '', $taxonomy ) ); |
| 399 |
|
$current_filter = isset( $_GET[ $filter_name ] ) ? explode( ',', wc_clean( $_GET[ $filter_name ] ) ) : array(); |