• Resolved despachotres

    (@despachotres)


    Hi,

    Testing and loving, but there’s a problem. I’ve setup 3 memberships levels that expires in 1, 2 and 3 hours.

    The time is gone and the users still have access.

    I’ve checked the wp cronjobs and the “pmpro_cron_expire_memberships” is running hourly as expected.

    Check this screenshot: https://take.ms/lvzd4

    The “bronce” level is set to expire in 1 hour. But it’s not working.

    How can I troubleshoot this?

    Thanks,

    Daniel.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter despachotres

    (@despachotres)

    And this is a screen capture of how I setup the levels: https://take.ms/CWkgo

    Thread Starter despachotres

    (@despachotres)

    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)

    Thread Starter despachotres

    (@despachotres)

    I’ve even tested this snippet: https://gist.github.com/strangerstudios/af45ff954013cbf20ec030c33a958ef2

    And the memberships are not being expired either.

    Plugin Support Jarryd Long

    (@jarryd-long)

    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?

    Thread Starter despachotres

    (@despachotres)

    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.

    Thread Starter despachotres

    (@despachotres)

    There should be no difference, no matter if you assign a level manually or a user goes through the checkout.

    Plugin Support Jarryd Long

    (@jarryd-long)

    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.

    Thread Starter despachotres

    (@despachotres)

    Thanks for the reply.

    In which database/table/field do I have to enter that information?

    Plugin Support Jarryd Long

    (@jarryd-long)

    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.

    Thread Starter despachotres

    (@despachotres)

    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.

    Plugin Support Jarryd Long

    (@jarryd-long)

    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.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Expiration not working’ is closed to new replies.