Fix for 0 sale price not returning true in is_on_sale

This commit is contained in:
Gerhard 2013-05-08 12:59:48 +02:00
parent 742cd3ae36
commit 97ad6e0cda
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}