Fixed is_on_sale function for products without prices. Closes #3189
This commit is contained in:
parent
b4d80e4e04
commit
8c7277bf9c
|
@ -637,7 +637,7 @@ class WC_Product {
|
|||
* @return bool
|
||||
*/
|
||||
function is_on_sale() {
|
||||
return isset( $this->sale_price ) && $this->sale_price == $this->price ? true : false;
|
||||
return ( $this->sale_price != $this->regular_price && $this->sale_price == $this->price );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue