Code Duplication    Length = 5-6 lines in 2 locations

includes/class-wc-stripe-webhook-handler.php 2 locations

@@ 487-492 (lines=6) @@
484
		/* translators: 1) The URL to the order. 2) The reason type. */
485
		$message = sprintf( __( 'A review has been opened for this order. Action is needed. Please go to your <a href="%1$s" title="Stripe Dashboard" target="_blank">Stripe Dashboard</a> to review the issue. Reason: (%2$s)', 'woocommerce-gateway-stripe' ), $this->get_transaction_url( $order ), $notification->data->object->reason );
486
487
		if ( apply_filters( 'wc_stripe_webhook_review_change_order_status', true, $order, $notification ) ) {
488
			$order->update_status( 'on-hold', $message );
489
		} else {
490
			$order->add_order_note( $message );
491
		}
492
	}
493
494
	/**
495
	 * Process webhook reviews that are closed. i.e Radar.
@@ 512-516 (lines=5) @@
509
		$message = sprintf( __( 'The opened review for this order is now closed. Reason: (%s)', 'woocommerce-gateway-stripe' ), $notification->data->object->reason );
510
511
		if ( 'on-hold' === $order->get_status() ) {
512
			if ( apply_filters( 'wc_stripe_webhook_review_change_order_status', true, $order, $notification ) ) {
513
				$order->update_status( 'processing', $message );
514
			} else {
515
				$order->add_order_note( $message );
516
			}
517
		} else {
518
			$order->add_order_note( $message );
519
		}