Code Duplication    Length = 5-5 lines in 2 locations

includes/widgets/class-wc-widget-layered-nav.php 2 locations

@@ 230-234 (lines=5) @@
227
				$count             = isset( $term_counts[ $term->term_id ] ) ? $term_counts[ $term->term_id ] : 0;
228
229
				// Only show options with count > 0
230
				if ( 0 < $count ) {
231
					$found = true;
232
				} elseif ( 'and' === $query_type && 0 === $count && ! $option_is_set ) {
233
					continue;
234
				}
235
236
				echo '<option value="' . esc_attr( $term->slug ) . '" ' . selected( $option_is_set, true, false ) . '>' . esc_html( $term->name ) . '</option>';
237
			}
@@ 380-384 (lines=5) @@
377
			}
378
379
			// Only show options with count > 0
380
			if ( 0 < $count ) {
381
				$found = true;
382
			} elseif ( 'and' === $query_type && 0 === $count && ! $option_is_set ) {
383
				continue;
384
			}
385
386
			$filter_name    = 'filter_' . sanitize_title( str_replace( 'pa_', '', $taxonomy ) );
387
			$current_filter = isset( $_GET[ $filter_name ] ) ? explode( ',', wc_clean( $_GET[ $filter_name ] ) ) : array();