Code Duplication    Length = 10-10 lines in 2 locations

includes/class-wc-query.php 2 locations

@@ 875-884 (lines=10) @@
872
						AND pm2.meta_value = %s
873
					", $min_class, $max_class, sanitize_title( $tax_class ) ), OBJECT_K ), $min_class, $max_class );
874
875
					if ( $matched_products_query ) {
876
						foreach ( $matched_products_query as $product ) {
877
							if ( $product->post_type == 'product' ) {
878
								$matched_products[] = $product->ID;
879
							}
880
							if ( $product->post_parent > 0 ) {
881
								$matched_products[] = $product->post_parent;
882
							}
883
						}
884
					}
885
				}
886
			} else {
887
				$matched_products_query = apply_filters( 'woocommerce_price_filter_results', $wpdb->get_results( $wpdb->prepare( "
@@ 896-905 (lines=10) @@
893
					AND pm1.meta_value BETWEEN %f AND %f
894
				", $min, $max ), OBJECT_K ), $min, $max );
895
896
				if ( $matched_products_query ) {
897
					foreach ( $matched_products_query as $product ) {
898
						if ( $product->post_type == 'product' ) {
899
							$matched_products[] = $product->ID;
900
						}
901
						if ( $product->post_parent > 0 ) {
902
							$matched_products[] = $product->post_parent;
903
						}
904
					}
905
				}
906
			}
907
908
			$matched_products = array_unique( $matched_products );