Merge pull request #3131 from kloon/master

Fix 0 sale price not returning true in is_on_sale
This commit is contained in:
Coen Jacobs 2013-05-08 04:50:07 -07:00
commit 36767d8f22
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 $this->sale_price && $this->sale_price == $this->price ? true : false;
return isset( $this->sale_price ) && $this->sale_price == $this->price ? true : false;
}