how can set default quantity zero for all products

Estimated reading: 1 minute 339 views

Some time, user need default quantity for Table, Then user can add custom code by any code snippet plugin or in child theme’s functions.php file.

Add following code to your child theme’s functions.php file.

/**
 * If you want to set Zero for default quantity value,
 * this function and hook will help you.
 * 
 * @author Saiful Islam <codersaiful@gmail.com>
 */
add_filter('woocommerce_quantity_input_min','wpt_custom_default_quantity_zero');
function wpt_custom_default_quantity_zero(){
	return 0;
}

Get this code from Github Gist – Code for set zero for default value.

Share this Doc

how can set default quantity zero for all products

Or copy link

CONTENTS