How to Remove the Quantity Field from a WooCommerce Product Page
hi by default, WooCommerce shows a quantity selector on a product's page. This might not always be needed, so here are three ways in which you disable this feature.
In this video, we remove the number field in two ways.
Alternatively, you can insert this piece of code into your theme’s functions.php file or in a custom plugin. This will remove the quantity field for all your WooCommerce products across your site.
The second method code is added to the functions.php file in the template folder. code:
function remove_quantity( $return, $product )
{
return true;
}
add_filter( 'woocommerce_is_sold_individually','remove_quantity', 10, 2 );
❤️ Don't Forget to Subscribe to our YouTube channel for ✨ the latest updates - / @wpturbo