1 min read

WooCommerce Product Quantity Dropdown and Default QTY

WooCommerce Product Quantity Dropdown and Default QTY

We are currently building a WooCommerce site for a Wine company and needed to have the option to add to cart bottles and cases of wine.

We needed to allow the customer to easily add any amount of product to their cart, but by default we wanted the quantities to show 6 for bottles and 1 for cases. It would be too ambitious to expect customer to buy 6 cases of wine in one go!

Here is our code forked from Gerhard Potgieter’s site. We’ve added the conditional default quantities.

Original: Gerhard Potgieter WooCommerce Quantity Dropdown

[gist https://gist.github.com/raisonon/b978f2ebc4d4e60f28c6 /]