Membership not used limits added to the next month

Posted by: Karol Jarek

4th January 2020, 4:43 pm

Karol Jarek

@dts

4 Jan 2020
4:43 pm

Hi,

I would like to make some changes in your plugin in download limits for memberships. I would like to add not used limits in previous month to the next month.

For example:

someone have 50 download products limit per month

used only 20

in the next month limit is 80

and that for all the month when subscription is active.

Now I've made counter in my menu header that shows "credits" and every month is available 50, when member download product, counter is going down to 49,48,47... and etc.

If you can tell me in which files in your plugin I should  make changes.

How to change function $download_limits['products'] to increase it every month for not used limits?

I hope that you can help me to make this changes.

Thank You

  • Richard Webster

    @rwebster

    6 Jan 2020
    12:33 pm

    Hi Karol,

    Thanks for reaching out. Your idea has come up a couple of times and I've started planning a credits add-on, like how Audible works.

    Essentially the number of downloads remaining isn't stored anywhere, it's just calculated based on how many downloads the user has made (these are tracked custom post types) subtracted from their monthly/weekly/daily limit amount.

    If you want to make a credit system you would first need to store the number of downloads as an entity itself. Then you would have to hook into the WooCommerce Memberships renewal/refresh actions to calculate how many the user had left, and then add that number to a new entity/field somewhere in the database.

    It's actually pretty complicated which is why I haven't done it yet, I don't want to just do the bare minimum so need to map it all out properly.

  • Karol Jarek

    @dts

    6 Jan 2020
    3:03 pm

    I have a copy of your plugin with some modifications an removed a few functions, maybe you would like to check it a try to add this functionality to my plugin for additional fees?

This topic is closed to new replies.

Looking for Square One Media? Check this post