Open remcotolsma opened 2 months ago
https://github.com/pronamic/wp-pay-core/blob/bd197f4b1d3ddd2947c8d0a210171c2e7482bac7/src/Subscriptions/SubscriptionPhase.php#L293-L312
The next payment date can go far beyond the end date of a subscription phase.
Should we add something like this?
if ( null !== $this->end_date ) { $next_date = \min( $next_date, $this->end_date ); }
Probably also rename the variable $next_date to $anchor_date or $pointer_date?
$next_date
$anchor_date
$pointer_date
CC @rvdsteege
As discussed at HQ, I think that that would be correct to fix the calculation.
https://github.com/pronamic/wp-pay-core/blob/bd197f4b1d3ddd2947c8d0a210171c2e7482bac7/src/Subscriptions/SubscriptionPhase.php#L293-L312
The next payment date can go far beyond the end date of a subscription phase.
Should we add something like this?
Probably also rename the variable
$next_date
to$anchor_date
or$pointer_date
?CC @rvdsteege