Code Duplication    Length = 3-3 lines in 2 locations

includes/api/class-wc-api-orders.php 1 location

@@ 646-648 (lines=3) @@
643
				}
644
645
				// Mark as paid if set.
646
				if ( $order->needs_payment() && isset( $data['payment_details']['paid'] ) && true === $data['payment_details']['paid'] ) {
647
					$order->payment_complete( isset( $data['payment_details']['transaction_id'] ) ? $data['payment_details']['transaction_id'] : '' );
648
				}
649
			}
650
651
			// Set order currency.

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

@@ 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