From 95609928ba79aefb08aed14161ef4eccdd8e7db3 Mon Sep 17 00:00:00 2001 From: JeroenSormani Date: Mon, 10 Aug 2015 16:36:40 +0200 Subject: [PATCH] FIx is_on_sale bug on variable products --- includes/class-wc-product-variable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-product-variable.php b/includes/class-wc-product-variable.php index 068ec70ad10..63b14af9ced 100644 --- a/includes/class-wc-product-variable.php +++ b/includes/class-wc-product-variable.php @@ -201,7 +201,7 @@ class WC_Product_Variable extends WC_Product { public function is_on_sale() { $is_on_sale = false; $prices = $this->get_variation_prices(); - if ( $prices['regular_price'] !== $prices['price'] ) { + if ( $prices['regular_price'] !== $prices['sale_price'] && $prices['sale_price'] === $prices['price'] ) { $is_on_sale = true; } return apply_filters( 'woocommerce_product_is_on_sale', $is_on_sale, $this );