-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
To re-create:
- Payment fails at the gateway.
- Member notified of the failed payment.
- Member logs in and clicks the downgraded member level.
- They’re shown the correct price and enter their new credit card details.
- Amount charged on receipt shows $0.
Downgrading the membership level should first check that they have paid until the current date, just as the code for memberships with the same payment periods do below:
pmpro-proration/pmpro-proration.php
Lines 101 to 110 in ac569ee
| $payment_date = pmprorate_trim_timestamp( $morder->timestamp ); | |
| $next_payment_date = pmprorate_trim_timestamp( pmpro_next_payment( $current_user->ID ) ); | |
| $today = pmprorate_trim_timestamp( current_time( 'timestamp' ) ); | |
| $days_in_period = ceil( ( $next_payment_date - $payment_date ) / 3600 / 24 ); | |
| //if no days in period (next payment should have happened already) return level with no change to avoid divide by 0 | |
| if ( $days_in_period <= 0 ) { | |
| return $level; | |
| } |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels