Skip to content

Commit

Permalink
Fix operator for checking subscription status on first payment attempt.
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdsteege committed Sep 19, 2024
1 parent 6ed60c3 commit 0dabbae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Subscriptions/SubscriptionsModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0dabbae

Please sign in to comment.