This is the problem: When I tested by adding members manually and setting their expiration date and time, they did not get expired and still had access to the courses.
I was trying to find a solution with MasterStudy LMS support and after they tested this issue multiple times, they said:
“I wanted to update you on the ongoing issue where users with expired subscriptions still have access to the course. Our development team has thoroughly investigated the matter and has determined that the root cause lies within the PMP’s admin page/settings, which we do not have the capability to alter, as it involves PMP’s source code.”
Hi there, thank you for reaching out to the Paid Memberships Pro team.
We haven’t had any widespread reports of members not expiring so this is could caused by your site’s cron jobs not running, resulting in members not expiring.
Please deactivate and reactivate the Paid Memberships Pro plugin to restart all cron jobs and let me know if the issue persists.
Kind Regards, Jarryd Support Manager at Paid Memberships Pro
Please send me your Site Health information so that I can have a better understanding of your site and look further into this for you? Do you have any custom code running on your site?
Your Site Health contains details about your WordPress and PMPro setup which can help us quickly pinpoint possible conflicts or problems that could cause the issue you’re currently experiencing.
Please follow the steps below to retrieve your Site Health Info in the WordPress admin and reply back to us when the details have been added:
Navigate to Tools > Site Health in the WordPress admin. Click on the “Info” tab. Click the button to “Copy site info to clipboard”.
The entire output of your Site Health is now copied to your clipboard. You can paste it into a reply here.
Kind Regards, Jarryd Support Manager at Paid Memberships Pro
Everything in your Site Health appears normal and levels are set up correctly. Would you mind sending a screenshot of a specific user that isn’t expiring? Please navigate to Memberships > Members and edit the relevant user – screenshots of the Subscriptions and Orders tab would help. Feel free to blank out any personal information of that user.
Kind Regards, Jarryd Support Manager at Paid Memberships Pro
If you look at the 2nd row you will see that the expiration date marks a past date but the user is still listed with the active membership. In the other rows you can see the history of tests we were doing before reporting the error and asking for help.
Btw, there are no subscriptions or orders history because users are added manually, as I mentioned at the beginning.
The only active subscription in that list is for the Ingles Integral level which has an expiration date set to June 26, 2025 so this level will only expire this time next year. All other levels in that list have either been changed by an admin or expired as expected.
Kind Regards, Jarryd Support Manager at Paid Memberships Pro
After several tests I entered the year 2025 by mistake, I’m sorry. The error persists even when the date has already expired, as I mentioned before. You can corroborate it in the 2nd row of the following image: https://i.ibb.co/7WPcb04/000.png
If you look at the third row you will see that the expiration time worked only once when I tested.
PS: I deactivated and reactivated the Paid Memberships Pro plugin but it’s still the same.
The cron job used to expire members only runs once a day though. Please try installing a third-party plugin called WP Crontrol so that you can force run the Membership Expire cron and let me know if that membership expires?
Unfortunately I can’t replicate the behavior you are experiencing so we have to try and troubleshoot this together.
Kind Regards, Jarryd Support Manager at Paid Memberships Pro
Please try and remove the first one and re-run the second one – perhaps it will run now that it doesn’t have a conflicting cron job trying to be scheduled before it.
Kind Regards, Jarryd Support Manager at Paid Memberships Pro
Then, I found that the error was generated by a code snippet that I used to force users to log in to enter the website. I changed it to another one, tried again and now the cron events work fine. The test user already appears with the expired membership. I think the problem is solved! 🙂
Thank you so much for your kind support. 👏🏼👏🏼👏🏼
Just one thing: Is there a way to prevent users from logging in if their membership is expired or not active?
I’m so glad to hear it’s now working as expected for you.
I would recommend hooking into the authentication filter (core WP filter). You can then use the PMPro PMPro_Subscription class to check if the user has an active subscription or not and prevent them from logging in.
Kind Regards, Jarryd Support Manager at Paid Memberships Pro
Viewing 14 replies - 1 through 14 (of 14 total)
The topic ‘Expiration time not working’ is closed to new replies.