Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next Payment Date incorrectly calculated if level has custom trial period. #3130

Open
3 tasks done
ipokkel opened this issue Aug 29, 2024 · 1 comment
Open
3 tasks done

Comments

@ipokkel
Copy link
Member

ipokkel commented Aug 29, 2024

Describe the bug
When setting a custom trial period at $0 for a level, e.g. $0 for the first 2 subscription payments, and a user cancels the level early during the trial period their level is given back with an incorrect expiration date.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Memberships > Settings > Levels and create a new level with an initial payment, e.g. $150, and a recurring billing amount, e.g. $10 per 1 Month(s), check Custom Trial, and set the trial billing amount to $0 for the first 2 (or more) subscription payments, and save the level.
  2. Navigate to the frontend Membership Levels page, select this level, and check out.
  3. From the Membership Account page click on the "Cancel" link for this level.
  4. See the incorrect date in the warning notification displayed before canceling.
  5. Cancel membership account.
  6. See the incorrect date set as expiration date.

Screenshots
2024-08-28_09-00-10

2024-08-28_08-52-18

Expected behavior
If the user is in a free Custom Trial period to calculate the expiration date to the next payment date as set at the gateway

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 Memberships Pro 3.1.3
@ipokkel
Copy link
Member Author

ipokkel commented Aug 29, 2024

When setting the trial period using the Subscription Delays Add On and specifying the amount of days works perfectly for getting the correct next payment date and can be used as an alternative to a Custom Trial period at $0.

Note: Making this change to level settings will not apply retroactively and applies only to new checkouts after the change is made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants