Fix for 0 sale price not returning true in is_on_sale
This commit is contained in:
parent
742cd3ae36
commit
97ad6e0cda
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue