/**
* For cart
*/
add_filter('woocommerce_cart_item_quantity', 'trueroman_min_kolvo_cart', 20, 3);
function truemisha_min_kolvo_cart($product_quantity, $cart_item_key, $cart_item)
{
$product = $cart_item['data'];
$min = 0;
if (567 === $product->get_id()) { // товар с ID 500
$min = 1;
}
return woocommerce_quantity_input(
array(
'input_name' => "cart[{$cart_item_key}][qty]",
'input_value' => $cart_item['quantity'],
'max_value' => $product->get_max_purchase_quantity(),
'min_value' => $min,
'product_name' => $product->get_name(),
),
$product,
false
);
}