| @@ 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. |
|
| @@ 670-678 (lines=9) @@ | ||
| 667 | * @param WC_Order $order For to which the source applies. |
|
| 668 | * @param stdClass $source Source information. |
|
| 669 | */ |
|
| 670 | protected function save_source( $order, $source ) { |
|
| 671 | // Store source in the order. |
|
| 672 | if ( $source->customer ) { |
|
| 673 | update_post_meta( $order->id, '_stripe_customer_id', $source->customer ); |
|
| 674 | } |
|
| 675 | if ( $source->source ) { |
|
| 676 | update_post_meta( $order->id, '_stripe_card_id', $source->source ); |
|
| 677 | } |
|
| 678 | } |
|
| 679 | ||
| 680 | /** |
|
| 681 | * Store extra meta data for an order from a Stripe Response. |
|