Avoid PHP error if no price

This commit is contained in:
George Mamadashvili 2012-02-27 17:47:18 +04:00
parent 2654c587a7
commit 07b3c67ab0
1 changed files with 5 additions and 1 deletions

View File

@ -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();