Code Duplication    Length = 3-3 lines in 2 locations

includes/cli/class-wc-cli-order.php 2 locations

@@ 158-160 (lines=3) @@
155
				update_post_meta( $order->id, '_payment_method_title', $data['payment_details']['method_title'] );
156
157
				// Mark as paid if set.
158
				if ( isset( $data['payment_details']['paid'] ) && $this->is_true( $data['payment_details']['paid'] ) ) {
159
					$order->payment_complete( isset( $data['payment_details']['transaction_id'] ) ? $data['payment_details']['transaction_id'] : '' );
160
				}
161
			}
162
163
			// Set order currency.
@@ 512-514 (lines=3) @@
509
				}
510
511
				// mark as paid if set
512
				if ( $order->needs_payment() && isset( $data['payment_details']['paid'] ) && $this->is_true( $data['payment_details']['paid'] ) ) {
513
					$order->payment_complete( isset( $data['payment_details']['transaction_id'] ) ? $data['payment_details']['transaction_id'] : '' );
514
				}
515
			}
516
517
			// set order currency