From 485038030bdff99bf051f47945eb1ac160853323 Mon Sep 17 00:00:00 2001 From: Phillip Morton Date: Mon, 11 Dec 2017 17:12:26 +0000 Subject: [PATCH] Allow 0% discount --- classes/client-fixed-quantity-price.php | 2 +- classes/woofix-utility.php | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/classes/client-fixed-quantity-price.php b/classes/client-fixed-quantity-price.php index 3165ac6..1446d14 100644 --- a/classes/client-fixed-quantity-price.php +++ b/classes/client-fixed-quantity-price.php @@ -573,7 +573,7 @@ function woofix_locate_template($template_name, $load) /** * Reutrn Variable product Dropdown options * @return json - */ + **/ function get_dropdown_callback(){ $return_arr = array(); diff --git a/classes/woofix-utility.php b/classes/woofix-utility.php index 46a8e77..b76c967 100644 --- a/classes/woofix-utility.php +++ b/classes/woofix-utility.php @@ -98,8 +98,11 @@ private static function constructQtyData($postId, $current_user_roles) if (empty($qty_data['woofix_qty'])) continue; - if (empty($qty_data['woofix_disc']) && empty($qty_data['woofix_price'])) - continue; + + if (isset ($qty_data['woofix_disc']) ==false && empty($qty_data['woofix_price'])) + continue; + + $returnValue[] = $qty_data; }