Top WooCommerce & WordPress Plugins › Forums › Maximum Products per User for WooCommerce › How can I limit lessons to per memberships?
- Support forum for the Maximum Products per User for WooCommerce.
- This topic has 4 replies, 3 voices, and was last updated 3 years, 9 months ago by
Tom Anbinder.
- AuthorPosts
-
February 4, 2020 at 5:38 pm #100341
ANNE E SCHMIDT
ParticipantWe have a golf academy website, and we’re using WooCommerce Subscriptions, Bookings, and Memberships. I just purchased this plugin, and I need to set up a membership so that it only allows 1 (bookable) golf lesson per month. I have another type of membership that allows 2 (bookable) lessons per month.
The member has the option to buy more lessons each month if they’d like but at a discounted rate. Just trying to figure out how to use your plugin to allow the to book only 1 or 2 lessons per month depending on membership type.
Thanks in advance!
AnneFebruary 4, 2020 at 9:21 pm #100342Hi Anne,
Could you please let me know if each membership type has its own user role? Or those are not connected?
February 4, 2020 at 10:04 pm #100343Anne
GuestIt does not. I haven’t done anything with user roles, but could. Was trying to figure out how to create new roles.
February 5, 2020 at 12:26 am #100344Ok, if you will be able to connect memberships and user roles, then you will just need to enable “User roles” checkbox in plugin settings and then set max quantities for each user role (and optionally product).
If you won’t be able to connect it with user roles – I will have to add some code to the plugin to make it work with memberships.
February 5, 2020 at 11:29 pm #100345Hi Anne,
We’ve released new plugin v2.4.2 today, where I’ve added new
membership_plan
attribute to the “Formula” section. So now you can set max quantities per membership plan (i.e. without user roles). Basically now you need to add something like this to the “Formula” option:[alg_wc_mppu_max_qty max_qty="2" membership_plan="silver,gold"]
I.e. in this example you will set the max quantity to
2
pcs. for all users withsilver
orgold
membership plan (you need to use membership plan slugs here).If you want to set different max quantities for different products, then you need to enable “Per Product” checkbox in “Quantities” section and set “Formula” to e.g.:
[alg_wc_mppu_max_qty max_qty="2" membership_plan="silver,gold" product_id="101,102"] [alg_wc_mppu_max_qty max_qty="1" membership_plan="silver,gold" product_id="103,104"]
Please let me know if something is not working as expected or if you have any questions.
P.S. If you wish, you can also share an admin account to your site, so I could log in and help you with it (my email is [email protected]).
- AuthorPosts
- You must be logged in to reply to this topic.