Skip to content

Commit cfccc0b

Browse files
committed
Prevent payments for subscription payment method changes from updating subscription status.
1 parent b96d116 commit cfccc0b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Subscriptions/SubscriptionsModule.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ public function complement_subscription_by_payment( $payment ) {
138138
* @return void
139139
*/
140140
public function payment_status_update( $payment ) {
141+
// Payment method changes do not affect the subscription status.
142+
if ( 'subscription_payment_method_change' === $payment->get_source() ) {
143+
return;
144+
}
145+
141146
foreach ( $payment->get_subscriptions() as $subscription ) {
142147
// Status.
143148
$status_before = $subscription->get_status();

0 commit comments

Comments
 (0)