From a274000d34a10b78841c0080565f9d1c34bc1605 Mon Sep 17 00:00:00 2001 From: Brent Shepherd Date: Tue, 6 Jun 2017 13:40:36 -0700 Subject: [PATCH] Append variable price suffix only once --- includes/class-wc-product-variable.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/class-wc-product-variable.php b/includes/class-wc-product-variable.php index ed818a5ffa8..58162dc72f2 100644 --- a/includes/class-wc-product-variable.php +++ b/includes/class-wc-product-variable.php @@ -143,14 +143,14 @@ class WC_Product_Variable extends WC_Product { $max_reg_price = end( $prices['regular_price'] ); if ( $min_price !== $max_price ) { - $price = wc_format_price_range( $min_price, $max_price ) . $this->get_price_suffix(); + $price = wc_format_price_range( $min_price, $max_price ); } elseif ( $this->is_on_sale() && $min_reg_price === $max_reg_price ) { - $price = wc_format_sale_price( wc_price( $max_reg_price ), wc_price( $min_price ) ) . $this->get_price_suffix(); + $price = wc_format_sale_price( wc_price( $max_reg_price ), wc_price( $min_price ) ); } else { - $price = wc_price( $min_price ) . $this->get_price_suffix(); + $price = wc_price( $min_price ); } - $price = apply_filters( 'woocommerce_variable_price_html', $price, $this ); + $price = apply_filters( 'woocommerce_variable_price_html', $price . $this->get_price_suffix(), $this ); } return apply_filters( 'woocommerce_get_price_html', $price, $this );