Woocommerce min quantity purchase on products

cockypea

Free Member
Jun 17, 2025
43
6
Yep, been down that rabbit hole myself. WooCommerce doesn’t offer min quantity settings out of the box, annoyingly – it’s one of those things you assume would be built-in. The easiest fix is a plugin. I’ve used “Min/Max Quantities” before – does the job and lets you set rules per product.

If you're handy with code (I’m not), I’ve seen snippets floating around to set min qty via functions.php, but honestly... plugin’s just quicker and less stress. One less thing to break during updates.

Curious – is it to control wholesale orders or something else? I set mine up because people kept ordering 1 of an item I only sell in packs. Got tired of refunding.
 
Upvote 0

YasmeenLondon

Business Member
Business Listing
Jul 25, 2022
175
88
London
yasmeencreative.com
If you're handy with code (I’m not), I’ve seen snippets floating around to set min qty via functions.php, but honestly... plugin’s just quicker and less stress. One less thing to break during updates.

Adding code snippets to the child theme is how you avoid your code snippet from breaking when the website is updated.

I'd rather add a code snippet to the child theme than install a plugin and be forced to constantly update it.
 
  • Like
Reactions: fisicx
Upvote 0

cockypea

Free Member
Jun 17, 2025
43
6
Fair point, and yeah – if I trusted myself not to mess up functions.php (even in a child theme), I’d probably go that route too. I just know my luck… one typo and boom, white screen. Plugins feel safer for folks like me who’ve broken things at 2am and had to Google like a maniac. That said, totally get the logic – fewer moving parts, less maintenance. Out of curiosity: do you keep all your tweaks code-based, or just when plugins feel like overkill?
 
Upvote 0

fisicx

Moderator
Sep 12, 2006
46,659
8
15,359
Aldershot
www.aerin.co.uk
Woocommerce is a world of which I know nothing

but presumably you can experiment on your test site, not your live site

even on your home machine, if you can live with a bit of uploading and downloading
There are staging plugins that let you play with a test site. Then when you are happy you press the magic button and it goes live.

If you configure your site to report errors you will know what you have broken (often a misplaced comma).

Don’t be afraid of code. Everything is reversible. Just don’t do your editing online. Use an offline editor and upload using FTP or SVN
 
Upvote 0

Latest Articles