| @@ 262-271 (lines=10) @@ | ||
| 259 | * @param WC_Order $renewal_order The order which recorded the successful payment (to make up for the failed automatic payment). |
|
| 260 | * @return void |
|
| 261 | */ |
|
| 262 | public function update_failing_payment_method( $subscription, $renewal_order ) { |
|
| 263 | if ( WC_Stripe_Helper::is_pre_30() ) { |
|
| 264 | update_post_meta( $subscription->id, '_stripe_customer_id', $renewal_order->stripe_customer_id ); |
|
| 265 | update_post_meta( $subscription->id, '_stripe_source_id', $renewal_order->stripe_source_id ); |
|
| 266 | ||
| 267 | } else { |
|
| 268 | update_post_meta( $subscription->get_id(), '_stripe_customer_id', $renewal_order->get_meta( '_stripe_customer_id', true ) ); |
|
| 269 | update_post_meta( $subscription->get_id(), '_stripe_source_id', $renewal_order->get_meta( '_stripe_source_id', true ) ); |
|
| 270 | } |
|
| 271 | } |
|
| 272 | ||
| 273 | /** |
|
| 274 | * Include the payment meta data required to process automatic recurring payments so that store managers can |
|
| @@ 332-341 (lines=10) @@ | ||
| 329 | * @param WC_Order $renewal_order The order which recorded the successful payment (to make up for the failed automatic payment). |
|
| 330 | * @return void |
|
| 331 | */ |
|
| 332 | public function update_failing_payment_method( $subscription, $renewal_order ) { |
|
| 333 | if ( WC_Stripe_Helper::is_pre_30() ) { |
|
| 334 | update_post_meta( $subscription->id, '_stripe_customer_id', $renewal_order->stripe_customer_id ); |
|
| 335 | update_post_meta( $subscription->id, '_stripe_source_id', $renewal_order->stripe_source_id ); |
|
| 336 | ||
| 337 | } else { |
|
| 338 | update_post_meta( $subscription->get_id(), '_stripe_customer_id', $renewal_order->get_meta( '_stripe_customer_id', true ) ); |
|
| 339 | update_post_meta( $subscription->get_id(), '_stripe_source_id', $renewal_order->get_meta( '_stripe_source_id', true ) ); |
|
| 340 | } |
|
| 341 | } |
|
| 342 | ||
| 343 | /** |
|
| 344 | * Include the payment meta data required to process automatic recurring payments so that store managers can |
|