From 06a7570f4bfff1482c2daa710b47342e2bdbe868 Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 15 Dec 2017 15:32:50 +0000 Subject: [PATCH] Out of stock should not show qty in grouped products. --- templates/single-product/add-to-cart/grouped.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/single-product/add-to-cart/grouped.php b/templates/single-product/add-to-cart/grouped.php index 9693a855739..750780524d6 100644 --- a/templates/single-product/add-to-cart/grouped.php +++ b/templates/single-product/add-to-cart/grouped.php @@ -52,7 +52,7 @@ do_action( 'woocommerce_before_add_to_cart_form' ); ?> case 'quantity' : ob_start(); - if ( ! $grouped_product->is_purchasable() || $grouped_product->has_options() ) { + if ( ! $grouped_product->is_purchasable() || $grouped_product->has_options() || ! $grouped_product->is_in_stock() ) { woocommerce_template_loop_add_to_cart(); } elseif ( $grouped_product->is_sold_individually() ) { echo '';