And this is a screen capture of how I setup the levels: https://take.ms/CWkgo
I’ve also installed WP Control to check cronjobs, but doesn’t work.
I run it manually, but it doesn’t expire. Check screenshot: https://take.ms/jf4Cv
(In my setup, I’ve configured a “real” cronjob in my hosting that runs each 15 minutes, disabling WordPress’ cronjob, and its running ok)
I’ve even tested this snippet: https://gist.github.com/strangerstudios/af45ff954013cbf20ec030c33a958ef2
And the memberships are not being expired either.
Hi @despachotres , thank you for reaching out to Paid Memberships Pro.
Please advise if the user that you tested with that membership level was manually assigned a level or did you test it by working through the checkout process?
Hi
The user’s are being added by code, using the REST API as explained here: https://www.paidmembershipspro.com/documentation/advanced/api/rest-api/#change-membership-level
I’m using the “change-membership-level” call to asign a user a membership level.
Thanks.
There should be no difference, no matter if you assign a level manually or a user goes through the checkout.
Thank you for your feedback. There is a difference between a user being added manually or through checkout.
The checkout process will allocate an expiration date to the user however manually assigning or making use of the REST API endpoint does not assign an expiration date to the member based on the level settings at this point in time.
Our development team is aware of this and is reviewing the functionality however I don’t have an ETA as to when further development would be done on this.
An alternative workaround would be to copy that endpoint’s code and create your own that adds support for an expiration date based on the level settings.
Thanks for the reply.
In which database/table/field do I have to enter that information?
You can reference the pmpro_memberships_users table and specify an enddate from there. I hope this helps, let me know if you have any other questions.
Done! Thanks very much for the support.
Till you fix it, I’ve created a custom cronjob to fill the “enddate” if it’s empty.
Regards,
Daniel.
Excellent, I’m so glad to hear it’s now working as expected. Feel free to reach out if there’s anything else we can assist you with – I’ll be marking this thread as resolved.