From 8093194a44b03dee693ad657c3a5617c70b5bd1a Mon Sep 17 00:00:00 2001 From: Mike Jolley Date: Fri, 22 Jan 2016 17:53:09 +0000 Subject: [PATCH] [2.5] Qty button can be hidden for variables sold individually --- .../add-to-cart/variation-add-to-cart-button.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/single-product/add-to-cart/variation-add-to-cart-button.php b/templates/single-product/add-to-cart/variation-add-to-cart-button.php index 51f1a100514..7ce8ece277c 100644 --- a/templates/single-product/add-to-cart/variation-add-to-cart-button.php +++ b/templates/single-product/add-to-cart/variation-add-to-cart-button.php @@ -14,7 +14,9 @@ if ( ! defined( 'ABSPATH' ) ) { global $product; ?>
- isset( $_POST['quantity'] ) ? wc_stock_amount( $_POST['quantity'] ) : 1 ) ); ?> + is_sold_individually() ) : ?> + isset( $_POST['quantity'] ) ? wc_stock_amount( $_POST['quantity'] ) : 1 ) ); ?> +