Code Duplication    Length = 3-3 lines in 2 locations

includes/payments/class-payments-query.php 1 location

@@ 773-775 (lines=3) @@
770
		if ( ! empty( $this->args['fields'] ) && 'all' !== $this->args['fields'] ) {
771
			if ( is_string( $this->args['fields'] ) ) {
772
				$fields = "{$wpdb->posts}.{$this->args['fields']}";
773
			} elseif ( is_array( $this->args['fields'] ) ) {
774
				$fields = "{$wpdb->posts}." . implode( " , {$wpdb->posts}.", $this->args['fields'] );
775
			}
776
		}
777
778
		// Set count.

includes/donors/class-give-donors-query.php 1 location

@@ 220-222 (lines=3) @@
217
		if ( ! empty( $this->args['fields'] ) && 'all' !== $this->args['fields'] ) {
218
			if ( is_string( $this->args['fields'] ) ) {
219
				$fields = "{$this->table_name}.{$this->args['fields']}";
220
			} elseif ( is_array( $this->args['fields'] ) ) {
221
				$fields = "{$this->table_name}." . implode( " , {$this->table_name}.", $this->args['fields'] );
222
			}
223
		}
224
225
		// Set count.