interestingly seems to work on storefront. what worked for me at rey was:
add_filter( ‘woocommerce_quantity_input_max’, function( $max, $product ) {
// Το Rey ελέγχει το max με strict ( !== -1 ). Αν το “απεριόριστο” φτάσει
// ως -1.0 ή “-1”, ο έλεγχος αστοχεί, κάνει cap τη γραμμή και η WooCommerce
// τη διαγράφει. Κανονικοποιούμε κάθε αρνητικό σε ακέραιο -1.
if ( is_numeric( $max ) && (float) $max < 0 ) {
return -1;
}
return $max;
}, 99999, 2 );