From 0dabbae5d5d41e7b04c9d4809c82822149e509a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reu=CC=88el=20van=20der=20Steege?= Date: Thu, 19 Sep 2024 13:13:25 +0200 Subject: [PATCH] Fix operator for checking subscription status on first payment attempt. --- src/Subscriptions/SubscriptionsModule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Subscriptions/SubscriptionsModule.php b/src/Subscriptions/SubscriptionsModule.php index 24528dd7..e262e6f6 100644 --- a/src/Subscriptions/SubscriptionsModule.php +++ b/src/Subscriptions/SubscriptionsModule.php @@ -165,7 +165,7 @@ public function payment_status_update( $payment ) { case PaymentStatus::CANCELLED: case PaymentStatus::EXPIRED: // Set subscription status to 'On Hold' only if the subscription is not already active when processing the first payment. - if ( $subscription->is_first_payment( $payment ) && SubscriptionStatus::ACTIVE === $subscription->get_status() ) { + if ( $subscription->is_first_payment( $payment ) && SubscriptionStatus::ACTIVE !== $subscription->get_status() ) { $status_update = SubscriptionStatus::ON_HOLD; }