How to Remove Quantity Field from WooCommerce Product Page

By default, WooCommerce displays a quantity selector on a product’s page. This might not always be wanted, so here are the methods in which you disable this feature.

Method 1: Using the option in the Product Data metabox

This meta box is found on the wp-admin page for editing that particular product. Scroll down past the editor and you will find the Product Data metabox and the setting under Inventory.

Method 2: Using a hook or filter

function custom_remove_all_quantity_fields( $return, $product ) {return true;}
add_filter( 'woocommerce_is_sold_individually','custom_remove_all_quantity_fields', 10, 2 );

You can insert this piece of code into your theme’s functions.php file, or in a custom plugin if you wish.

Deals & Discount

Coupons

Unbounce Coupon

Save 35% off your first year

Cloudways Coupon

Save 20% off first 1 months

Featured

WordPress Plugins

PatternsWP

WordPress Block Patterns Library