This article will guide you through the step-by-step process to set the maximum number of products per user in WooCommerce. After reading this tutorial, you’ll able to limit the number of products each user can purchase from your store.
I’ll also share some use cases to help you better understand this feature. Without any further ado, let’s jump straight into the tutorial.
On This Page
Use Cases For Setting Maximum Products Per User For WooCommerce
Several use cases could require you to set a maximum limit to the number of products a customer can purchase. It depends on your business and the goals.
The following are the three main use cases to add this feature to your WooCommerce store.
1. Limited Edition Product Sales
Suppose a business is selling a limited edition product, such as a collectible item or special edition merchandise.
By setting a maximum limit on the number of units per customer, the business ensures that a broader customer base can purchase the limited edition item, preventing a small group of customers from buying the entire stock.
2. Event Ticket Sales
Imagine an online ticketing platform selling tickets for a popular event or concert.
To prevent breakdown and ensure fair access to tickets, the platform sets a maximum limit on the number of tickets each customer can purchase. This approach helps distribute tickets more evenly among a larger audience.
3. Inventory Management for Handmade Products
Suppose a small business sells handmade or artisanal products with limited production capacity.
To manage inventory effectively and maintain a sustainable production pace, the business sets a maximum limit on the quantity of each product per customer. This ensures that the demand aligns with the available resources for crafting these unique items.
When implementing such limits, it's important to communicate the reasons clearly to customers through product descriptions, terms of service, or during checkout. This transparency helps build trust and ensures a positive customer experience.
How to Set Maximum Products Per User For WooCommerce?
There are multiple plugins including free and paid ones that can help you add this feature to your online store. I’ll use a free plugin to help you restrict the number of products your customers can purchase.
The following are the steps to do so.
1. Install and Activate the Maximum Products Per User For WooCommerce Plugin
First, you must install and activate your store's ‘Maximum Products Per User For WooCommerce’ plugin. To install it, navigate to Plugins < Add New from your WordPress dashboard and search for the plugin’s name in the search bar.
It will be the first result by WPFactory.
Click the ‘Install Now’ button to install it; once it is installed, it will be replaced with the ‘Activate’ button. Click it to activate the plugin.
Note: I have already installed and activated the plugin, so I see the ‘Active’ button instead of Install now and Activate buttons.
2. Navigate to Plugin Settings
Once you have installed and activated the plugin, we need to configure it to match our expectations. To access its settings, navigate to WooCommerce > Settings > Maximum Products Per User from your WordPress dashboard.
3. Configure the Plugin Settings
On the settings page, the restriction feature will be enabled by default. So, we only need to focus on the rest of the settings. The very first thing you need to do is to select the restriction mode.
It provides you with different restriction modes, but as we only want to limit the product quantity (same product ) a customer can purchase, ensure you’ve selected the ‘Product Quantities’ from the Mode dropdown.
If you want you can also set the restriction as number of orders a customer can purchase.
3.1. Select the Date Range
After that, you need to select the date range, after which each customer can make a purchase again. You can choose from several different ranges and select the one that suits your requirements perfectly.
However, for this tutorial, I want to add a lifetime limit. It will allow customers to purchase a specific quantity of a product from your store. If they try to buy more than that, they’ll see an error message that you can also customize.
Scroll down to the ‘Date Range Options’ section and select ‘Lifetime’ or your preferred range from the ‘Date Range’ dropdown.
You can leave the rest of the settings to default, but how you want to configure each setting is up to you.
Don’t forget to click the ‘Save Changes’ button at the bottom left corner of your screen to save the settings. Otherwise, you’ll lose all the settings you made.
4. Enable the Maximum Products Per User Limit
After configuring some general settings, we need to enable and set the limit. To do so, click the ‘Limit’ button at the top.
4.1. Enable the Limit
Check the ‘All Products’ checkbox to enable each customer's maximum product purchase limit.
3.2. Set the Limit Per User
After enabling it, we need to set the limit. It is the maximum product quantity each user can purchase from your store.
Enter the number in the ‘Limit per user’ field.
3.3. Save Changes
Once done, scroll to the bottom and click the ‘Save Changes’ button.
If you want to change the front-end message or disable the checkout if they try to purchase more than the specific quantity of a product, you are free to dive into the plugin settings and adjust them as you want.
5. Final Results
Let’s test the final results.
To test it, I visited my shop page and I was able to add 3 quantities or units of a product to my cart. But when I tried to add one more quantity of the same product to my cart, I saw an error message at the top of the page.
I couldn’t add more quantity of the same product to my cart. However, I could add a maximum of 3 quantities of another product to my cart.
Note: You can follow the Limit Cart Quantity tutorial if you want your customers to purchase only one or more products at a time from your store.
Conclusion
That’s it for today’s article.
I hope it was helpful to you and that you were able to set the maximum number of products per user limit in your WooCommerce store. You can configure different settings in the plugin to make some advanced changes on the front end.
It could be a valuable feature for your store and allow you to increase the customer experience and build trust if you sell limited or exclusive edition products.