How To Limit Max Order Quantity In WooCommerce

As a shop owner, you may want to sell as many items as possible. However, there are cases you want to limit the number of items a single customer can purchase. The reasons can vary: maybe you have limited stock, maybe you don’t want a single customer stocks many items and reseller it later with much higher price… Whatever the reason, you will feel the need for a function to set the maximum number of item per product that a single customer can purchase. The good news is, there is a solution for that and it’s totally free.

Meet the plugin that enable max quantity of items that a single customer can purchase PER PRODUCT

Remember, the limit is PER PRODUCT (I’m sorry for the uppercase but this is important). For example, you have leather bag and plastic bag. You can set the quantity limit for leather bag is 2 and plastic bag is 3. So, your customer can order up to 5 items total but she cannot buy more than 2 leather bags or 3 plastic bags.

Now, let’s install this plugin called Woocommerce Max Quantity

Installing the plugin is very straightforward. You can search the plugin by entering its name in Plugins->Add new. You may need to scroll down a bit to see the plugin since at the time of this writing, it stays at the bottom of the first page.

After activation, go to the product you want to set the limit. Click on Inventory tab. You will see there is a new box appears to enable the max quantity. In the example below, a single customer can only purchase 4 fake lamborghini cars from my store:

Set max quantity for single customer on a product
Set max quantity for single customer on a product

Now, update the product and let’s go to the product page and try to order more than 4 items:

Max Quantity order per item Woocommerce

As you can see, the store sends a notice to customer when she tried to order more than the limit.


The plugin does a great job setting the limit for the order per single product. If any improvement needed, I think that’s a function to display the limit right below the order button so the customer can see the limit right before she enters the order quantity.

How To Add Scroll To Top Button To Your WordPress Website With Custom Icon and Text

The scroll to top button is not something you are unfamiliar with. There are many websites use that feature. WordPress’ themes tend to support that feature out of the box too. My theme has a button to scroll to the top of the page when I’m reading a long post too. However, the button is not what I like. I could go and modify the code to change the button but that would be very time consuming and it’s not the best practice. So, I decided to make a plugin that enables users to add a Scroll to top button to their site.

What’s the difference between this plugin and other plugin? You may ask. Well, the difference is you can fully customize the button as you like. You can change the image, make it hidden on mobile devices (if you like). You can also change the width, height, padding and the position of the button on the screen.

Sounds good? Let’s meet the plugin.

How to use the Ultimate Scroll to Top button

So, the plugin only has one screen for all of its settings. Here are all of them:

Ultimate scroll to top button plugin settings


As you can see, you can set the button’s width and height in many different units. You can use pixel, em, rem, %… I would recommend you use a square ratio (1:1). However, if you find a different ratio works for you, don’t hesitate.

The padding box allows you to enter the padding value of the icon. This is the padding for all sides. You can specify the value in px, rem, % just like width and height. However, make sure you enter the unit along with the number. For example 4em, 5%…

There are two possible positions for the scroll to top icon. They are bottom left and bottom right. I hardly imagine a scroll to top button stays at the top of the page. However, you can correct me and I’ll add more positions for you.

Now, the most important part of the plugin is the content of the button. As you can see, you can set the content of the icon with a full-featured text editor. Here, you can put whatever you want: text, image or even videos. However, I would recommend you use png images. There are plenty of up arrow, scroll to top button on the internet. One place I usually go to get the icon is They have many good icons you can use for the scroll to top button.

After that, you can click on save changes and see the scroll to top button appears on your site.

If you need video instructions, here it is:



It’s a plugin I made because I find the scroll to top button should be flexible. There are room for improvements, of course. If you have any question and suggestions, please let me know.