Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 308-314 (lines=7) @@
305
	 * Don't transfer Stripe customer/token meta to resubscribe orders.
306
	 * @param int $resubscribe_order The order created for the customer to resubscribe to the old expired/cancelled subscription
307
	 */
308
	public function delete_resubscribe_meta( $resubscribe_order ) {
309
		delete_post_meta( ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $resubscribe_order->id : $resubscribe_order->get_id() ), '_stripe_customer_id' );
310
		delete_post_meta( ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $resubscribe_order->id : $resubscribe_order->get_id() ), '_stripe_source_id' );
311
		// For BW compat will remove in future
312
		delete_post_meta( ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $resubscribe_order->id : $resubscribe_order->get_id() ), '_stripe_card_id' );
313
		$this->delete_renewal_meta( $resubscribe_order );
314
	}
315
316
	/**
317
	 * Don't transfer Stripe fee/ID meta to renewal orders.

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

@@ 316-322 (lines=7) @@
313
	 * Don't transfer Stripe customer/token meta to resubscribe orders.
314
	 * @param int $resubscribe_order The order created for the customer to resubscribe to the old expired/cancelled subscription
315
	 */
316
	public function delete_resubscribe_meta( $resubscribe_order ) {
317
		delete_post_meta( ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $resubscribe_order->id : $resubscribe_order->get_id() ), '_stripe_customer_id' );
318
		delete_post_meta( ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $resubscribe_order->id : $resubscribe_order->get_id() ), '_stripe_source_id' );
319
		// For BW compat will remove in future
320
		delete_post_meta( ( WC_Stripe_Helper::is_wc_lt( '3.0' ) ? $resubscribe_order->id : $resubscribe_order->get_id() ), '_stripe_card_id' );
321
		$this->delete_renewal_meta( $resubscribe_order );
322
	}
323
324
	/**
325
	 * Don't transfer Stripe fee/ID meta to renewal orders.