@@ 286-295 (lines=10) @@ | ||
283 | * @param WC_Order $renewal_order The order which recorded the successful payment (to make up for the failed automatic payment). |
|
284 | * @return void |
|
285 | */ |
|
286 | public function update_failing_payment_method( $subscription, $renewal_order ) { |
|
287 | if ( WC_Stripe_Helper::is_pre_30() ) { |
|
288 | update_post_meta( $subscription->id, '_stripe_customer_id', $renewal_order->stripe_customer_id ); |
|
289 | update_post_meta( $subscription->id, '_stripe_source_id', $renewal_order->stripe_source_id ); |
|
290 | ||
291 | } else { |
|
292 | update_post_meta( $subscription->get_id(), '_stripe_customer_id', $renewal_order->get_meta( '_stripe_customer_id', true ) ); |
|
293 | update_post_meta( $subscription->get_id(), '_stripe_source_id', $renewal_order->get_meta( '_stripe_source_id', true ) ); |
|
294 | } |
|
295 | } |
|
296 | ||
297 | /** |
|
298 | * Include the payment meta data required to process automatic recurring payments so that store managers can |
@@ 328-337 (lines=10) @@ | ||
325 | * @param WC_Order $renewal_order The order which recorded the successful payment (to make up for the failed automatic payment). |
|
326 | * @return void |
|
327 | */ |
|
328 | public function update_failing_payment_method( $subscription, $renewal_order ) { |
|
329 | if ( WC_Stripe_Helper::is_pre_30() ) { |
|
330 | update_post_meta( $subscription->id, '_stripe_customer_id', $renewal_order->stripe_customer_id ); |
|
331 | update_post_meta( $subscription->id, '_stripe_source_id', $renewal_order->stripe_source_id ); |
|
332 | ||
333 | } else { |
|
334 | update_post_meta( $subscription->get_id(), '_stripe_customer_id', $renewal_order->get_meta( '_stripe_customer_id', true ) ); |
|
335 | update_post_meta( $subscription->get_id(), '_stripe_source_id', $renewal_order->get_meta( '_stripe_source_id', true ) ); |
|
336 | } |
|
337 | } |
|
338 | ||
339 | /** |
|
340 | * Include the payment meta data required to process automatic recurring payments so that store managers can |