| @@ 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. |
|
| @@ 721-729 (lines=9) @@ | ||
| 718 | * @param WC_Order $order For to which the source applies. |
|
| 719 | * @param stdClass $source Source information. |
|
| 720 | */ |
|
| 721 | protected function save_source( $order, $source ) { |
|
| 722 | // Store source in the order. |
|
| 723 | if ( $source->customer ) { |
|
| 724 | update_post_meta( $order->id, '_stripe_customer_id', $source->customer ); |
|
| 725 | } |
|
| 726 | if ( $source->source ) { |
|
| 727 | update_post_meta( $order->id, '_stripe_card_id', $source->source ); |
|
| 728 | } |
|
| 729 | } |
|
| 730 | ||
| 731 | /** |
|
| 732 | * Store extra meta data for an order from a Stripe Response. |
|