From 96ca19d170bc4cda6d2fb5556e9c849da2b5a99e Mon Sep 17 00:00:00 2001 From: roykho Date: Tue, 7 Apr 2015 07:23:00 -0700 Subject: [PATCH] fixed flatrate per item and per class if no additional costs added, it doesn't correctly fallback to base cost closes #7851 --- includes/shipping/flat-rate/class-wc-shipping-flat-rate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php b/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php index 89d12b45571..2170cffcfa9 100644 --- a/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php +++ b/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php @@ -329,7 +329,7 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method { if ( $matched ) { return $cost + $fee; } else { - return null; + return 0; } } @@ -372,7 +372,7 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method { if ( $matched ) { return $costs; } else { - return null; + return 0; } }