Home › Forums › Maximum Products per User for WooCommerce › Is it possible to limit the maximum quantity per user?
- Support forum for the Maximum Products per User for WooCommerce.
- This topic has 4 replies, 2 voices, and was last updated 3 years, 5 months ago by Tom Anbinder.
December 6, 2019 at 5:30 am #100320JohnGuest
Hello sorry I just want to confirm if I can also set up max to specific user regardless of role such as “user A” has a total of 10 apples a month but “user B” can buy 20 a month when both are subscribersDecember 6, 2019 at 8:55 pm #100321
Unfortunately no – currently max quantity can be set per user role only (or for all users at once). However, I was already thinking about adding per user options, so I’m going to add it in the next plugin version. I’m planning to release it right after the weekend, on Monday or Tuesday.December 13, 2019 at 12:42 am #100322
It took me a little longer than expected, but I’ve finally managed to add max quantity on per user basis to the plugin.
I’ve implemented it a bit differently this time. In new v2.3.0 I’ve added new “Formula” section to the plugin settings (in “WooCommerce > Settings > Maximum Products per User > Formula”). After enabling this section, you need to set “Formula” option to something like this:
[alg_wc_mppu_max_qty max_qty="10" user_id="1"] [alg_wc_mppu_max_qty max_qty="20" user_id="2"]
Here you need to replace
1with the actual user ID of “user A”, and
2with user ID of “user B”.
You can find more formula examples on the plugin settings page, for example, you can set max quantity on per user per product basis.
Please let me know if something is not working as expected or if you have any questions.
P.S. “Max Quantity by Formula” is available in Pro version only.December 13, 2019 at 2:45 am #100323John AyalaGuest
Wow you are awesome! I will definitly purchase this app amazing support thanks alotDecember 13, 2019 at 1:44 pm #100324
Happy to help 🙂 Please let me know if you need anything else.
And thank you for the purchase!
- You must be logged in to reply to this topic.