Code Duplication    Length = 12-12 lines in 2 locations

includes/compat/class-wc-stripe-sepa-subs-compat.php 1 location

@@ 157-168 (lines=12) @@
154
	 * @param  int $order_id
155
	 * @return array
156
	 */
157
	public function process_payment( $order_id, $retry = true, $force_save_source = false, $previous_error = false ) {
158
		if ( $this->has_subscription( $order_id ) ) {
159
			if ( $this->is_subs_change_payment() ) {
160
				return $this->change_subs_payment_method( $order_id );
161
			}
162
163
			// Regular payment with force customer enabled
164
			return parent::process_payment( $order_id, $retry, true, $previous_error );
165
		} else {
166
			return parent::process_payment( $order_id, $retry, $force_save_source, $previous_error );
167
		}
168
	}
169
170
	/**
171
	 * Process the payment method change for subscriptions.

includes/compat/class-wc-stripe-subs-compat.php 1 location

@@ 168-179 (lines=12) @@
165
	 * @param  int $order_id
166
	 * @return array
167
	 */
168
	public function process_payment( $order_id, $retry = true, $force_save_source = false, $previous_error = false ) {
169
		if ( $this->has_subscription( $order_id ) ) {
170
			if ( $this->is_subs_change_payment() ) {
171
				return $this->change_subs_payment_method( $order_id );
172
			}
173
174
			// Regular payment with force customer enabled
175
			return parent::process_payment( $order_id, $retry, true, $previous_error );
176
		} else {
177
			return parent::process_payment( $order_id, $retry, $force_save_source, $previous_error );
178
		}
179
	}
180
181
	/**
182
	 * Scheduled_subscription_payment function.