From 97ad6e0cda1daf31579b75f464fba9b135ba3549 Mon Sep 17 00:00:00 2001 From: Gerhard Date: Wed, 8 May 2013 12:59:48 +0200 Subject: [PATCH] Fix for 0 sale price not returning true in is_on_sale --- classes/abstracts/abstract-wc-product.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/abstracts/abstract-wc-product.php b/classes/abstracts/abstract-wc-product.php index 44111131492..9387e4cc062 100644 --- a/classes/abstracts/abstract-wc-product.php +++ b/classes/abstracts/abstract-wc-product.php @@ -636,7 +636,7 @@ class WC_Product { * @return bool */ function is_on_sale() { - return $this->sale_price && $this->sale_price == $this->price ? true : false; + return isset( $this->sale_price ) && $this->sale_price == $this->price ? true : false; }