Skip to content

Commit

Permalink
Merge pull request #99 from pronamic/mollie-23-subscription-renewal
Browse files Browse the repository at this point in the history
Don't set payment method on manual subscription renewal.
  • Loading branch information
remcotolsma authored Feb 21, 2023
2 parents 3132ff6 + cae322f commit af9c0c9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Subscriptions/SubscriptionsModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,15 @@ private function handle_subscription_renew( Subscription $subscription ) {

$payment->order_id = $subscription->get_order_id();

/**
* We set the payment method to `null` so that users get the
* chance to choose a payment method themselves if possible.
*
* @link https://github.com/pronamic/wp-pronamic-pay-mollie/issues/23
* @link https://github.com/pronamic/wp-pay-core/pull/99
*/
$payment->set_payment_method( null );

$payment->set_lines( $subscription->get_lines() );
$payment->set_total_amount( $current_phase->get_amount() );

Expand Down

0 comments on commit af9c0c9

Please sign in to comment.