From c5da6aa783dadab278636fe51ca7ba86b1375405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Albert=20Juh=C3=A9=20Lluveras?= Date: Tue, 4 Aug 2020 14:33:59 +0200 Subject: [PATCH] Filter quantity in add_to_cart_handler_grouped --- includes/class-wc-form-handler.php | 1 + 1 file changed, 1 insertion(+) diff --git a/includes/class-wc-form-handler.php b/includes/class-wc-form-handler.php index 80a4336aba5..8abb61a1251 100644 --- a/includes/class-wc-form-handler.php +++ b/includes/class-wc-form-handler.php @@ -826,6 +826,7 @@ class WC_Form_Handler { $quantity_set = false; foreach ( $items as $item => $quantity ) { + $quantity = wc_stock_amount( $quantity ); if ( $quantity <= 0 ) { continue; }