Setting a Default Quantity
This article explains how to set default quantities using the WooCommerce Default Quantity plugin. You can set the default quantity either globally, by category, or for each individual product.
Global default quantity
Go to WooCommerce → Settings → Products → Default Quantity.
Upon initial plugin activation, the default value is set to 1 – the default value for most WooCommerce stores. You can change this to any value, including zero.
The global default quantity will appear as the starting value in the quantity picker throughout your store, except for any products where you have overridden this on a category or product basis.
Setting the default category quantity
Set the default quantity for entire categories by going to Product → Categories and adding or editing a category.
Sub-categories inherit the default quantity of their parent category.
Setting default quantities for individual products
Set the default quantity for specific products as follows:
- To to the Products section of the WordPress admin and click on a product to access the Add/Edit Product screen.
- Scroll down to the ‘Product data’ section and click on the ‘Inventory’ tab.
- Change the default quantity to any number, including zero.
Default quantity logic
Products with multiple default quantities
The plugin will use the following logic for products that have more than one default quantity set:
- The default quantity for the individual product will always take precedence and override global or category-level quantities.
- The category-level default quantity overrides the global setting.
- The global setting affects all products apart from those where a category or product-level quantity has been set.
Products that can only be bought one at a time
Ticking the “Enable this to only allow one of this item to be bought in a single order” box in the ‘Inventory’ tab for a product will hide the quantity picker for the product. As a result, if this box is ticked then it is not possible to set a default quantity.
Default quantity is higher than the stock level
If the default quantity is higher than the number of items in stock, then the current stock level will appear as the default quantity. This ensures that the default quantity will only show when it is actually possible to purchase that quantity.
For example, if the quantity is 5 but only 3 are in stock, then the default quantity will appear as 3.
What happens if a product is in two categories with different default quantities?
If a product is in two categories with different default quantities, then the plugin will use the default quantity from the first category. The order of categories is determined on the categories list in the WordPress admin (Products → Categories).