is_on_sale should compare type Fixes #7344

This commit is contained in:
Mike Jolley 2015-02-10 12:34:53 +00:00
parent d93d00271d
commit 840efcaa00
1 changed files with 1 additions and 1 deletions

View File

@ -696,7 +696,7 @@ class WC_Product {
* @return bool
*/
public function is_on_sale() {
return apply_filters( 'woocommerce_product_is_on_sale', ( $this->get_sale_price() != $this->get_regular_price() && $this->get_sale_price() == $this->get_price() ), $this );
return apply_filters( 'woocommerce_product_is_on_sale', ( $this->get_sale_price() !== $this->get_regular_price() && $this->get_sale_price() === $this->get_price() ), $this );
}
/**