Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit 5fa52d8

Browse files
committed
move to next year when 12 months are added to first payment date
1 parent b64d898 commit 5fa52d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

includes/class-wc-subscriptions-synchroniser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ public static function calculate_first_payment_date( $product, $type = 'mysql',
687687
}
688688
}
689689
// when a certain number of months are added and the first payment date moves to next year
690-
if ( $month_number < gmdate( 'm', $from_timestamp ) ) {
690+
if ( $month_number <= gmdate( 'm', $from_timestamp ) ) {
691691
$year = gmdate( 'Y', $from_timestamp );
692692
$year++;
693693
$first_payment_timestamp = wcs_strtotime_dark_knight( "{$payment_day} {$month} {$year}", $from_timestamp );

0 commit comments

Comments
 (0)