Fixed is_on_sale function for products without prices. Closes #3189

This commit is contained in:
Coen Jacobs 2013-05-22 13:18:28 +02:00
parent b4d80e4e04
commit 8c7277bf9c
1 changed files with 1 additions and 1 deletions

View File

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