Code Duplication    Length = 8-9 lines in 2 locations

includes/widgets/class-wc-widget-products.php 1 location

@@ 111-118 (lines=8) @@
108
			$query_args['post_parent']  = 0;
109
		}
110
111
		if ( ! empty( $instance['hide_free'] ) ) {
112
			$query_args['meta_query'][] = array(
113
				'key'     => '_price',
114
				'value'   => 0,
115
				'compare' => '>',
116
				'type'    => 'DECIMAL',
117
			);
118
		}
119
120
		$query_args['meta_query'][] = WC()->query->stock_status_meta_query();
121
		$query_args['meta_query']   = array_filter( $query_args['meta_query'] );

includes/cli/class-wc-cli-order.php 1 location

@@ 577-585 (lines=9) @@
574
			$query_args['post_status'] = $statuses;
575
		}
576
577
		if ( ! empty( $args['customer_id'] ) ) {
578
			$query_args['meta_query'] = array(
579
				array(
580
					'key'   => '_customer_user',
581
					'value' => (int) $args['customer_id'],
582
					'compare' => '='
583
				)
584
			);
585
		}
586
587
		return $query_args;
588
	}