How to Remove Quantity Option in WooCommerce

How to Remove Quantity Option in WooCommerce

Not all items are sold in quantities, so why do you have to have a quantity option for items you’re selling in your store?

For example, if you are selling handmade products you probably would have limited stock for each item and you would probably have items that are sold individually.

If you sell informational products it wouldn’t be logical to sell them in quantities.

Or if you have limited edition items you would probably want to sell them individually.

In many cases where you would want to sell the items in your store individually, but the default WooCommerce options don’t allow for such functionality, would you have to miss with code to remove the quantity option in WooCommerce?

There’s an easier solution.

Why Missing with Code Is Not Recommended If You’re Not a Developer?

If you know PHP you probably wouldn’t be reading such an article because you already know how to do it. You would add this code to the product’s page:

/** @Hide quantity using CSS */

function hide_quantity_using_css() {

if ( is_product() ) {

?>

<style type=”text/css”>.quantity, .buttons_added { width:0; height:0; display: none; visibility: hidden; }</style>

<?php

}

}

add_action( ‘wp_head’, ‘hide_quantity_using_css’ );

But this isn’t the cleanest way to do it if you’re not a developer, why?

Locating the file to edit correctly putting the code in the right place and making sure the code isn’t conflicting with any other pieces of code already existing isn’t an easy task for non-developers. 

The hassle is real if you want to make sure nothing will break, and the hassle of fixing broken sites is more real and would cost you real money.

That’s why you need a plugin like WPFactory.

How to Remove Quantity Option in WooCommerce with WPFactory?

Follow these simple steps:

  1. Login to your WordPress admin dashboard
  2. Go to plugins -> add new
  3. Search for “Min Max Default Quantity for WooCommerce
  4. Install the plugin and activate it
  5. Go to WooCommerce -> settings -> product quantity tab
  6. Scroll down in the general tab until you find “Sold individually”
  7. Tick the box to enable the feature
  8. Save changes 

min max plugin

Congratulations you now have removed the quantity option from all of the products in WooCommerce.

But the issue with this strategy is it’s applied site-wide, all the products will be sold individually if this feature is enabled, so if you only want to apply the “sold individually” feature to certain products, not the whole store.

If you want to remove the quantity option for individual products then you will need to follow these steps:

  1. Go to the product’s page
  2. In the product data section -> Inventory
  3. Tick the sold individually box 

Product data inventory

For this particular product, the quantity option will be removed.

Summary:

These were the three methods to remove the quantity option in WooCommerce, if you want to apply this feature to all the products in your store then the fastest, easiest, and most efficient way is to use WPFactory’s Min Max Default Quantity for WooCommerce plugin.

If you want to apply it individually then editing the inventory data and ticking the “sold individually” box is the way to go.

The least recommended way is to edit the code manually which would produce much trouble if anything goes wrong, and using WPFactory’s plugin for this feature won’t cost you anything because it’s free.

Leave a Reply

Your email address will not be published. Required fields are marked *