You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Testing emails for the "Cancel On Next Payment Date" user and admin email templates does not send a test email and returns a "Test email failed" notice.
Some observations from a preliminary debug:
function sendCancelOnNextPaymentDateEmail( $user, $level_id ): The level ID returned during testing was always the level with the highest ID value (the last level created).
This happens regardless if the administrator (tester) is a member of that level or not.
This happens regardless whether the level have or does not have an expiration period set or custom expiration date set via Set Expiration Date Add On.
It seems like the issue occurs at line 383 as no level is returned when running a send test: $level = pmpro_getSpecificMembershipLevelForUser( $user->ID, $level_id );
if ( empty( $level ) || empty( $level->enddate) ) {
returnfalse;
}
To Reproduce
Steps to reproduce the behavior:
Go to Memberships > Settings > Email Templates and select either the "Cancel On Next Payment Date" or "Cancel On Next Payment Date (admin)" email template.
Click on "Save Template and Send Email"
See error
Expected behavior
To be able to successfully send test emails for the "Cancel On Next Payment Date" or "Cancel On Next Payment Date (admin)" email templates.
Isolating the problem (mark completed items with an [x]):
I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active.
This bug happens with a default WordPress theme active, or Memberlite.
I can reproduce this bug consistently using the steps above.
WordPress Environment
Paid Membership Pro 3.0.3
PHP 8.3.0
The text was updated successfully, but these errors were encountered:
Describe the bug
Testing emails for the "Cancel On Next Payment Date" user and admin email templates does not send a test email and returns a "Test email failed" notice.
Some observations from a preliminary debug:
function sendCancelOnNextPaymentDateEmail( $user, $level_id )
: The level ID returned during testing was always the level with the highest ID value (the last level created).It seems like the issue occurs at line 383 as no level is returned when running a send test:
$level = pmpro_getSpecificMembershipLevelForUser( $user->ID, $level_id );
paid-memberships-pro/classes/class.pmproemail.php
Lines 383 to 388 in 873d917
To Reproduce
Steps to reproduce the behavior:
Expected behavior
To be able to successfully send test emails for the "Cancel On Next Payment Date" or "Cancel On Next Payment Date (admin)" email templates.
Isolating the problem (mark completed items with an [x]):
WordPress Environment
PHP 8.3.0
The text was updated successfully, but these errors were encountered: