Merge pull request #3131 from kloon/master
Fix 0 sale price not returning true in is_on_sale
This commit is contained in:
commit
36767d8f22
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue