Tested Updated Trending Bestseller Perfect rating Documented

Maximum Products per User for WooCommerce

(2 customer reviews)

From: $29.99 / year

Limit number of items your WooCommerce customers can buy (lifetime or in selected date range).

Clear

Description

With Maximum Products per User for WooCommerce Pro plugin you can limit number of items your WooCommerce customers (logged) can buy. Item quantity for user is limited on lifetime basis or in selected date range (i.e. not per order).

Quantity limits can be set for all products at once, on per product basis, per product category or per product tag.

Please note that there is no maximum quantity set for guest (i.e. not-logged) users. Possible solution would be to disable guest checkout via “Allow customers to place orders without an account” option in WooCommerce > Settings > Accounts & Privacy > Guest checkout.

While data is recalculated automatically (but only after the plugin was enabled), you can also force manual recalculation by running Recalculate sales data tool. This is useful on initial plugin install (i.e. to calculate sales data from before the plugin was enabled).

Options

Plugin settings are located in “WooCommerce > Settings > Maximum Products per User”.

General Options

Maximum Products per User for WooCommerce - General Options

Date range
Possible values: Lifetime; This hour; This day; This week; This month; This year; Last hour; Last 24 hours; Last 7 days; Last 30 days; Last 365 days; Custom.
Default: Lifetime
Custom date range (in seconds)
Used when “Custom” option is selected in “Date range”.
Default: 1
Order statuses
Choose order statuses when product quantities should be updated. If you select multiple order statuses, quantities are updated only once, on whichever status change occurs first. You will need to Recalculate sales data after changing the “Order statuses” option.
Default: Completed
Use variations
Use variations in “All products” and “Per product” calculations.
Default: no
User roles
Set different maximum product quantities for different user roles.
Default: no

Frontend Options

Validate on add to cart
Enable this if you want to check user quantities right away, on add to cart button click, instead of notice on cart and checkout pages only.
Default: yes
Customer message
Placeholders: %max_qty%, %product_title%, %qty_already_bought%, %remaining_qty%. You can also use HTML and/or shortcode here. E.g.: [alg_wc_mppu_translate] for WPML/Polylang translations.
Default:
You can only buy maximum %max_qty% pcs. of %product_title% (you already bought %qty_already_bought% pcs.).
Block checkout page
This will stop customer from accessing the checkout page on exceeded quantities. Customer will be redirected to the cart page.
Default: no

All Products

Maximum Products per User for WooCommerce - All Products Options

All products
Enables “All products” section.
Default: no
Maximum quantity per user
Maximum allowed each product’s quantity per user.
Default: 1

Per Product Taxonomy

Maximum Products per User for WooCommerce - Per Product Taxonomy Options

Per product tag
This will add new meta box to each product tag term’s edit page.
Default: no
Per product category
This will add new meta box to each product category term’s edit page.
Default: no

When section is enabled, you will see new “Maximum quantity per user” option in “Products > Categories > Your category > Edit” and/or “Products > Tags > Your tag > Edit”:

Maximum Products per User for WooCommerce - Per Product Taxonomy Options - Meta Box

Per Product

Maximum Products per User for WooCommerce - Per Product Options

Per product
Enables “Per product” section. This will add new meta box to each product’s edit page.
Default: no

Per product meta box for variable product with “Use variations” option enabled:

Maximum Products per User for WooCommerce - Per Product Meta Box - Variations

Per product meta box for simple product or for variable product with “Use variations” option disabled:

Maximum Products per User for WooCommerce - Per Product Meta Box - Simple

Per product meta box with User roles option enabled:

Maximum Products per User for WooCommerce - Per Product Options - User Roles

Max Quantity by Formula

This section introduces an alternative method for setting max quantities.

Maximum Products per User for WooCommerce - Max Quantity by Formula

Enable
Enables/disables “Max quantity by formula” section.
Default: no
Formula
One shortcode per line.
Default: None

Notes

  • You need to use [alg_wc_mppu_max_qty] shortcode here.
  • One shortcode per line.
  • Algorithm stops when first matching shortcode is found (from top to bottom).
  • Available shortcode attributes: user_id, user_role, product_id, term_id, max_qty.
  • max_qty attribute and at least one other attribute are required.
  • You need to enable “Per Product” checkbox in “Quantities” section to use product_id attribute.
  • You need to enable “Per product category” and/or “Per product tag” checkbox in “Quantities” section to use term_id attribute.
  • You can not use product_id and term_id simultaneously in one shortcode.

Formula Examples

Set maximum quantity to 18 for users 2 and 5:

[alg_wc_mppu_max_qty max_qty="18" user_id="2,5"]

Set maximum quantity to 18 for products 100 and 110 for users 2 and 5:

[alg_wc_mppu_max_qty max_qty="18" user_id="2,5" product_id="100,110"]

Admin Options

Maximum Products per User for WooCommerce - Admin Options

Editable sales data: Enable
You will be able to edit each user’s sales data (i.e. bought quantities) on user’s edit page (in “Users”).
Default: no
Editable sales data: Add empty items
Adds “Lifetime” column for products/terms with no sales data.
Default: no

Tools

Maximum Products per User for WooCommerce - Tools Options

Recalculate sales data
Check the box and save settings to run the tool. Please note that there is no undo for this action.
Default: no
Delete & recalculate sales data
Check the box and save settings to run the tool. Please note that there is no undo for this action.
Default: no

Advanced Options

Maximum Products per User for WooCommerce - Advanced Options

Time function
Possible values: Server time; WordPress time.
Default: Server time
Exclude products
You will need to “Recalculate sales data” for products to be excluded from sales data.
Default: None

Sales Data

You can check saved sales data for each product, by opening admin product’s edit page. For variable products you will see data for each variation as well. Similar “Sales Data” tables can be found on each category/tag edit pages:

Maximum Products per User for WooCommerce - Product Sales Data

2 reviews for Maximum Products per User for WooCommerce

  1. marco (verified owner)

    Excellent support from the team. Works as expected, and 1 on 1 support from the developer too. Thank you very much.

  2. Adam

    Simply perfect!

Add a review

Your email address will not be published. Required fields are marked *

45 thoughts on "Maximum Products per User for WooCommerce"

  1. Hi there, Pre-sale question

    Is it possible to set this so that we limit the amount of products a user with a certain role can purchase during 1 month? So basically I want to give some users a unique role and limit those users to only purchase 3 products per month, regardless of the product. Right now, the way I see it working is that it limits the purchases on a single product but not all the products, for instance if someone is purchasing a book, they can only purchase that specific book 3 times and no more, but I want it so that they can only purchase 3 products as a whole regardless of which product they want to purchase.

    Not sure if that makes sense. Please let me know. Thank you!

    1. Hi Guillermo,

      If I understood you correctly – possible solution would be to group your products in some product category or tag and then use “Per product category” or “Per product tag” option (in “WooCommerce > Settings > Maximum Products per User > Quantities > Per Product Taxonomy”). Please let me know if that’s good enough or if I misunderstood you.

  2. Is it possible to limit the customers order to 1 product per category but allow him to order as many quantities as he wants?

    Thank you

    1. Hi Jonas,

      Unfortunately, no – currently the plugin will require you to set max quantity for the product, so the closest solution would be to set max quantity to 1 for the category, i.e. customers will be able to buy only one product per category, but the quantity has also to be 1. Let me check if I can implement your task in the plugin. I will get back to you as soon as I can.

  3. Hello,

    I’m looking to limit max products based on their “Membership Plans” for the year.
    I’ve got your PRO version and I use “Max Quantity by Formula”

    [alg_wc_mppu_max_qty max_qty=”4″ membership_plan=”Family Membership 2020 (#273)”]
    [alg_wc_mppu_max_qty max_qty=”2″ membership_plan=”couple-membership-2020″]
    [alg_wc_mppu_max_qty max_qty=”1″ membership_plan=”student-membership-2020″]

    It’s not working. Am I missing something?

    1. Hi,

      Maybe it’s possible to share an admin account to your site, so I could log in and check what’s going on (my email is [email protected])? If sharing an account is not an option – let me know and I will solve this remotely.

    2. Done! I’ve created the account for you my site (GCAOttawa.ca).
      Thank you!

    3. Hi,

      I’ve just logged in to your site.

      1. You need to use membership plan slug instead of title, so I’ve replaced “Family Membership 2020 (#273)” with “student-membership-2020” in “Formula”.

      2. Please note that you have set quantities to be updated only when order is “Completed” (in “Order statuses” option in “General” plugin settings section).

      Please let me know if that solves it. If not – I will continue investigating. And in this case – maybe you have some test user assigned to some membership plan, so I could login as this user and test it?

    4. Hello Tom,

      Thank you for the response back.
      1. I will use the membership plan slug. <– I really needed to know this.
      2. I believe that the setting is correct.

      I am testing it with a product "test-sample-ticket". My user account is part of the "family-membership-2020" plan has been able to buy more than the 4 allowed.
      Should I change the settings in your point 2?

      I don't want the members to be able to add more in their cart after their maximum. Am I missing something?

    5. If anyone else has a similar issue – we’ve discovered a bug today – you need to enable one of the checkboxes in the “Quantities” section for “Formula” to become active. We will be releasing the fix as soon as possible, meanwhile, you can simply enable e.g. “Per product” checkbox (in “WooCommerce > Settings > Maximum Products per User > Quantities”). If you won’t then set any actual max quantities on the product edit pages, this checkbox won’t have any other effect, except fixing it, i.e. making “Formula” active.

    6. Just wanted to let you know – this is now fixed in plugin v2.4.3 – i.e. it’s no longer required to have any of the “Quantities” checkboxes enabled for “Formula” to be active.

  4. We 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!
    Anne

    1. Hi Anne,

      Could you please let me know if each membership type has its own user role? Or those are not connected?

    2. It does not. I haven’t done anything with user roles, but could. Was trying to figure out how to create new roles.

    3. Ok, 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.

    4. Hi 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 with silver or gold 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]).

  5. Hi dear support.

    I’m using this line in formula ( pro version ) :

    [alg_wc_mppu_max_qty max_qty=”0″ user_id=”5″ product_id=”448″]

    max_qty=”0″ It is considered unlimited !

    And it is not considered zero.

    The customer can order the product indefinitely.

    How do I set the product quota for the customer to zero?

    1. Hi,

      You are correct, max_qty="0" means that there are no restrictions for max quantity for that user. To set it to zero, you need to set max quantity to -1, i.e.:

      [alg_wc_mppu_max_qty max_qty="-1" user_id="5" product_id="448"]
  6. Hello,
    I’ve just tested your free version of the plugin and it worked fine.
    I have a question before proceeding to buy the pro version.
    Is it possible to limit the user to just one order in the time period?
    I think that it would work if I put my products in a specific category and limit the users by the category.
    I appreciate it if you confirm the needed functionality before purchasing the pro version.

    1. Hi Amin,

      Yes, that is possible. What you need to do is enable “Per product category” checkbox in “WooCommerce > Settings > Maximum Products per User > Quantities”. Then you need to go to some category in “Products > Categories > Edit category” and set “Maximum quantity per user” to 1 there.

    2. Is it possible to send me a limited license? One or two days is enough in order to validate the functionality adaptation.

  7. Hi
    is your plugin compatible with WooCommerce Wholesale Prices Premium ?
    Regards,
    Gaël

    1. Hi Gaël,

      To be honest, I didn’t test it with the “WooCommerce Wholesale Prices Premium” plugin, however, as our plugin doesn’t change product prices, I believe there should be no issues. Also, if something won’t work correctly, just let me know and I will fix it asap.

  8. Hi,
    Presale question: Will I be able to limit the maximum amount of products on a per user role basis for each product individually with this plugin?
    My site has many user roles and I must restrict how many items of a given product each user role will be able to acquire.
    I can see the free version does this but globally for all products. I must have this option enabled for individual products.
    Looking forward to your reply.

    1. Hi Robin,

      Yes, this is exactly what Pro version has – you will be able to set each user role’s quantities for each product individually.

      Hope that helps and please let me know if you have any questions.

    2. P.S. I’ve just added “Per product + User roles” screenshot to the plugin description.

    3. Thank you for your help, Tom.
      My final question before purchase would be: Is the plugin WooCommerce REST API-friendly?
      Many of the traits that make up my site are made with the REST API and I necessarily must have all plugin options be made available through this feature.
      Looking forward to your reply.

    4. There should be no issues with WooCommerce REST API, however, if something will not work correctly, I’m ready to help/fix.

  9. I’ve just purchased the pro plugin – I want to set it so that just one of my (many) products are restricted to one per user lifetime…. I don’t see a setting for that anywhere. What am I missing?

    1. Hi Ian,

      First you need to enable “Per product” checkbox in “WooCommerce > Settings > Maximum Products per User > Quantities”. After that you have two options:

      1. Go to some product’s admin edit page, locate the “Maximum Products per User” meta box and set max quantity there.

      2. Use new “Formula” feature that we’ve added just yesterday: go to “WooCommerce > Settings > Maximum Products per User > Formula”, enable the section and set “Formula” to something like this:

      [alg_wc_mppu_max_qty max_qty="10" product_id="100"]
      

      Here you need to replace 100 with your actual product ID(s) and 10 with desired max quantity.

      Hope that helps and please let me know if you have any questions.

  10. Hello, I have bought the pro version and the “per product” function does not work. The other “all products” that was in the free version was working fine. I need your support to make this work please.

    1. Hi,

      Sorry for the late reply. Would it be possible for me to log in to your site’s admin – usually it’s the fastest way of solving such issues. If yes – my email is [email protected]

  11. 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 subscribers

    1. Hi John,

      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.

    2. Hi John,

      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 1 with the actual user ID of “user A”, and 2 with 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.

    3. Wow you are awesome! I will definitly purchase this app amazing support thanks alot

    4. Hi John,

      Happy to help 🙂 Please let me know if you need anything else.

      And thank you for the purchase!

  12. Hi,

    I would like to put a limit on my customers’ purchase per day. But the only options that are available in “Date range” section are: Lifetime, This Month, This Year, Last 30 Days, Last 365 Days.
    No DAILY option 🙁

    1. Hi,

      I’ve just checked the plugin code and it seems that adding daily option shouldn’t be too hard. Will release new plugin version shortly.

    2. Hi,

      As promised, we’ve just released a new plugin version 2.1.0, where I’ve added these new date ranges to the plugin: “This hour”, “This day”, “This week”, “Last hour”, “Last 24 hours”, “Last 7 days”.

      Please let me know if something is not working as expected or if you have any questions. And if you like the plugin, please consider leaving me a rating.

  13. Greetings — This doesn’t appear to be working; perhaps it’s a conflict with the plugin, Direct Checkout Pro? Could someone please contact me to log into my WP site to see what might be happening? Thank you — Adam Jacobi

  14. Does this work with variation products too? Can I set a maximum purchase limit on a variation but allow other variations of the same product to also be purchased?

    1. Hi Kim,

      Sorry for a late reply.

      Yes, since plugin version 2.0.0 you can set maximum quantity on per variation basis. You need to enable “Use variations” option in plugin’s settings (in “WooCommerce > Settings > Maximum Products per User > General”).

      Hope that helps. Please let me know if you have any questions.

  15. Hi There,

    I’ve just installed and activated the plugin. It is showing on the product page and I have selected the max products per user but when I preview the product it has removed the delegate booking info which are fields added by woocommerce box office plugin and instead I see the following error message:

    Fatal error: Call to undefined method WC_Product_Simple::get_max_purchase_quantity() in /var/sites/y/yarlsideteachingschool.co.uk/public_html/wp-content/plugins/product-quantity-for-woocommerce-pro/includes/class-alg-wc-pq-core.php on line 476

    I use the woocommerce box office plugin to sell places on the courses we run and I’ve bought your plugin so that I could limit the maximum qty for certain courses.

    I suspect your plugin conflicts with woocommerce box office – I can’t manage without this plugin and I bought your plugin to enhance the functionality.

    Do you have any suggestions as to what I can do?

    Many thanks in advance.

    Kind Regards,

    Deb

    1. Hi Deb,

      Maybe I could log in to your server to check it out? If that’s possible – my private email is [email protected]. WP and FTP access would be perfect.

Leave a Reply

Your email address will not be published. Required fields are marked *

Changelog

2.4.3 - 18/02/2020

  • Fix - Formula - It's no longer required to have at least one of the "Quantities" section checkboxes to be enabled for "Formula" to be active.
  • Fix - Notices - Now always using the correct product ID (i.e. variation vs main variable product ID).
  • Dev - General Options - "Payment gateways" option added.
  • Dev - alg_wc_mppu_check_quantities_for_product filter added.

2.4.2 - 05/02/2020

  • Dev - Formula - membership_plan shortcode attribute added.
  • Dev - alg_wc_mppu_get_cart_item_quantities filter added.
  • Dev - alg_wc_mppu_validate_on_add_to_cart_quantity filter added.
  • Dev - alg_wc_mppu_save_quantities_item_qty filter added.
  • WC tested up to: 3.9.

2.4.1 - 20/01/2020

  • Dev - Replacing negative max qty with zero in notice now.
  • Dev - Code refactoring.

2.4.0 - 28/12/2019

  • Dev - Tools - "Delete sales data" tool added.
  • Dev - Tools - Advanced - "Orders date range" option added.
  • Dev - Tools - Advanced - "Query block size" option added.
  • Dev - Tools - Advanced - "Time limit" option added.
  • Dev - Tools - Advanced - "Loop function" option added.
  • Dev - Tools - Advanced - "Debug" option added.
  • Dev - Settings - General - Section split into two separate sections ("General" and "Frontend").
  • Dev - Settings - Admin & Tools - Section split into two separate sections.
  • Dev - Code refactoring.

2.3.1 - 25/12/2019

  • Dev - General Options - Date range - "Custom" date range options added.
  • Dev - "Advanced" options section added.

2.3.0 - 13/12/2019

  • Fix - User roles - "Guest" user role removed from the lists.
  • Dev - "Formula" (i.e. "Max Quantity by Formula") section added.
  • Dev - Code refactoring.
  • Tested up to: 5.3.

2.2.0 - 10/11/2019

  • Dev - General Options - "Order statuses" option added.
  • Dev - General Options - "User roles" option added.
  • Dev - Admin Options - "Editable sales data" options added (sales data can now be edited in backend on user's edit page).
  • Dev - alg_wc_mppu_get_max_qty filter added.
  • Dev - Admin settings restyled and split into sections.
  • Dev - Code refactoring.
  • WC tested up to: 3.8.

2.1.0 - 01/10/2019

  • Dev - General Options - Date range - "This hour", "This day", "This week", "Last hour", "Last 24 hours", "Last 7 days" ranges added.
  • Dev - General Options - "Time function" option added.
  • Dev - alg_wc_mppu_date_range filter added.
  • Dev - alg_wc_mppu_date_to_check filter added.
  • WC tested up to: 3.7.

2.0.0 - 28/07/2019

  • Dev - Per Product Taxonomy - "Per product tag" option added.
  • Dev - Per Product Taxonomy - "Per product category" option added.
  • Dev - General Options - "Use variations" option added.
  • Dev - General Options - "Validate on add to cart" option added.
  • Dev - General Options - "Date range" option added.
  • Dev - General Options - "Exclude products" option added.
  • Dev - Tools - "Delete & recalculate sales data" tool added.
  • Dev - Tools - Recalculate sales data - Button replaced with checkbox.
  • Dev - [alg_wc_mppu_translate] shortcode added (for "Customer message").
  • Dev - Major code refactoring.
  • Tested up to: 5.2.

1.1.2 - 20/04/2019

  • Dev - Admin settings descriptions updated.
  • Dev - "WC tested up to" updated.

1.1.1 - 08/04/2019

  • Dev - Code refactoring.
  • Dev - Data sanitized and escaped.

1.1.0 - 22/10/2018

  • Dev - Admin settings descriptions updated.
  • Dev - Code refactoring.

1.0.0 - 18/06/2018

  • Initial Release.

Frequently Asked Questions

Q. I'm seeing No data yet text in "Maximum Products per User: Sales Data" meta box.

A. While data is recalculated automatically (but only after the plugin was enabled), you can force manual recalculation by pressing Recalculate sales data button in "General Options" section (in "WooCommerce > Settings > Maximum Products per User"). This is useful on initial plugin install (i.e. to calculate sales data from before the plugin was enabled). Please note that product quantities are updated when order status is changed to Completed.

Free version

This plugin is a premium version of free "Maximum Products per User for WooCommerce" plugin.

Prices & Licenses

Single siteUnlimited sites
1 year[buy] $29.99 / year[buy] $79.99 / year
Lifetime[buy] $49.99[buy] $149.99

Installation and Updates

  • Buy the plugin 🙂
  • Download plugin's zip to your computer (you will receive an email with download link, or you can always download the plugin from your account).
  • Go to "Admin Dashboard > Plugins > Add New > Upload Plugin" and browse for downloaded zip file.
  • If plugin is successfully installed - you should see it added to the Plugins list.
  • To keep WPFactory items up to date, please install WPFactory Helper plugin and enter your site key.

Refunds

We want to ensure that you are 100% happy with your purchase, so if you feel the product(s) you purchased are not the best fit for your requirements and you attempted to resolve issues with product's author, we are offering 30 day money back guarantee refund policy.