diff options
author | Sean <seand7565@gmail.com> | 2020-12-15 14:43:08 -0600 |
---|---|---|
committer | Sean <seand7565@gmail.com> | 2020-12-16 08:33:25 -0600 |
commit | 5ad9618cfeaf6e8aa26cb23798cb85c2c20fa22c (patch) | |
tree | 25d58b417e59d6bc6c1ea7f1afb1378b0191fb64 /lib/solidus_subscriptions | |
parent | 982e340b73a63089907a3e68ebd7395f16892fa2 (diff) |
Avoid processing installments with cancelled subscriptions
Anyone who cancels their subscription with a failed installment will
still have an order created the next time installments are created.
This is because installments don't check the status of their associated
subscriptions before being processed.
This update will ensure that only installments with active subscriptions
are processed.
Diffstat (limited to 'lib/solidus_subscriptions')
-rw-r--r-- | lib/solidus_subscriptions/processor.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/solidus_subscriptions/processor.rb b/lib/solidus_subscriptions/processor.rb index 4946b5a..d56816a 100644 --- a/lib/solidus_subscriptions/processor.rb +++ b/lib/solidus_subscriptions/processor.rb @@ -34,7 +34,7 @@ module SolidusSubscriptions ). where( SolidusSubscriptions::Subscription.actionable.arel.constraints.reduce(:and). - or(SolidusSubscriptions::Installment.actionable.arel.constraints.reduce(:and)) + or(SolidusSubscriptions::Installment.actionable.with_active_subscription.arel.constraints.reduce(:and)) ). distinct. find_in_batches |