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