From 07b3c67ab05f4e10d2ff7c0c803935001e501266 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Mon, 27 Feb 2012 17:47:18 +0400 Subject: [PATCH] Avoid PHP error if no price --- classes/class-wc-product.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/class-wc-product.php b/classes/class-wc-product.php index 00c870745f2..ee3420da3a8 100644 --- a/classes/class-wc-product.php +++ b/classes/class-wc-product.php @@ -535,7 +535,11 @@ class WC_Product { $child_prices = array_unique( $child_prices ); - $min_price = min( $child_prices ); + if ( ! empty( $all_prices ) ) { + $min_price = min( $all_prices ); + } else { + $min_price = ''; + } if (sizeof($child_prices)>1) $price .= $this->get_price_html_from_text();