Change default input quantity (in quick view preview)
-
Dear all, I would like to know how
I can modify the default input quantity, inside the quick view preview, from 1 to 0.
I have used the below code but the result has affected the cart quantity
——————————————————
function quantity_input_default( $args, $product ) {
$args[‘input_value’] = 0;
return $args;
}
add_filter( ‘woocommerce_quantity_input_args’, ‘quantity_input_default’, 10, 2 );
——————————————————–
Please see the attachment.
Attachments:
You must be
logged in to view attached files.
Hello,
First of all thanks for choosing our Theme, we are glad to be you in WoodMart WordPress family :).
As you are using your custom code to modify the default input quantity inside the quick view preview,
It happens because the add to cart shown inside the quick preview , item card and inside the single product page, it’s the same. Also that quantity part is a related to default WooCommerce functionality and our theme does not influence this. So we did not have instructions on how to achieve what you want, I suggest you, try to increase your selector to be more specific.
Best Regards.