Code Duplication    Length = 9-9 lines in 2 locations

includes/legacy/class-wc-gateway-stripe.php 1 location

@@ 489-497 (lines=9) @@
486
	/**
487
	 * Save source to order.
488
	 */
489
	protected function save_source( $order, $source ) {
490
		// Store source in the order
491
		if ( $source->customer ) {
492
			update_post_meta( $order->id, '_stripe_customer_id', $source->customer );
493
		}
494
		if ( $source->source ) {
495
			update_post_meta( $order->id, '_stripe_card_id', $source->source->id );
496
		}
497
	}
498
499
	/**
500
	 * Store extra meta data for an order from a Stripe Response.

includes/class-wc-gateway-stripe.php 1 location

@@ 626-634 (lines=9) @@
623
	 * @param WC_Order $order For to which the source applies.
624
	 * @param stdClass $source Source information.
625
	 */
626
	protected function save_source( $order, $source ) {
627
		// Store source in the order.
628
		if ( $source->customer ) {
629
			update_post_meta( $order->id, '_stripe_customer_id', $source->customer );
630
		}
631
		if ( $source->source ) {
632
			update_post_meta( $order->id, '_stripe_card_id', $source->source );
633
		}
634
	}
635
636
	/**
637
	 * Store extra meta data for an order from a Stripe Response.