wp-pay-core
wp-pay-core copied to clipboard
Subscriptions follow-up payments controller and missed schedule
The subscriptions follow-up payments controller will only initiate follow-up payments for subscriptions where the next payment date is between now and 1 day ago:
https://github.com/pronamic/wp-pay-core/blob/bd197f4b1d3ddd2947c8d0a210171c2e7482bac7/src/Subscriptions/SubscriptionsFollowUpPaymentsController.php#L350-L368
Because this routine has to run every day, it should always work. However, there are situations where the routine does not run for a day or several days. For example, if a website is offline for a longer period of time due to a malfunction or something similar.
We cannot securely initiate payments for subscriptions with a next payment date in the past?
Subscriptions for which a follow-up payment has not been initiated on time remain active and administrators are not informed that there is a 'missed schedule'.
Should we introduce an extra controller that will put the 'missed schedule' subscriptions 'on hold'? By putting subscriptions with a next payment date that is more than 2 days in the past 'on hold'?
Or are there other options to better inform administrators about this?
CC @rvdsteege