Reply 355095 to: I’m facing issue with the website responsiveness on the mobile devices

Avatar: Rose Tyler
Rose Tyler
Support staff
May 2, 2023 at 08:35

Hello, Manish Singh,

Thank you for your response.

Could you please, add next code snippet to your child-theme/functions.php

add_filter('woocommerce_quantity_input_min', function($min_value, $_product) {
    $min_purchase_quantity = $_product->get_min_purchase_quantity();
    return $min_purchase_quantity > $min_value ? $min_purchase_quantity : $min_value;
}, 10, 2);

It seems WooCommerce sets 0 (zero) value as min quantity by default in it’s function ‘woocommerce_quantity_input’ → https://prnt.sc/9hIdNKyajQBK but for single product quantities they set another param for ‘min_value’ arg → https://prnt.sc/e8bSWnDBsgFq

In case we will get more similar requests we will consider adding such a fix globally included.

Waiting for your feedback!

Kind Regards,
8theme team

Go To The Whole Conversation In Topic

Helpful Topics

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.