diff --git a/classes/abstracts/abstract-wc-product.php b/classes/abstracts/abstract-wc-product.php index 9bf7438853f..b84f4627eac 100644 --- a/classes/abstracts/abstract-wc-product.php +++ b/classes/abstracts/abstract-wc-product.php @@ -637,7 +637,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; }