This commit is contained in:
Mike Jolley 2017-04-27 13:01:52 +01:00
parent 36dbe64170
commit db5e2572f6
2 changed files with 2 additions and 2 deletions

View File

@ -1644,7 +1644,7 @@ class WC_Product extends WC_Abstract_Legacy_Product {
public function get_price_html( $deprecated = '' ) {
if ( '' === $this->get_price() ) {
$price = apply_filters( 'woocommerce_empty_price_html', '', $this );
} else if ( $this->is_on_sale() ) {
} elseif ( $this->is_on_sale() ) {
$price = wc_format_sale_price( wc_get_price_to_display( $this, array( 'price' => $this->get_regular_price() ) ), wc_get_price_to_display( $this ) ) . $this->get_price_suffix();
} else {
$price = wc_price( wc_get_price_to_display( $this ) ) . $this->get_price_suffix();

View File

@ -148,7 +148,7 @@ class WC_Product_Variable extends WC_Product {
$price = apply_filters( 'woocommerce_variable_price_html', wc_format_sale_price( wc_price( $max_reg_price ), wc_price( $min_price ) ) . $this->get_price_suffix(), $this );
} else {
$price = apply_filters( 'woocommerce_variable_price_html', wc_price( $min_price ) . $this->get_price_suffix(), $this );
}
}
}
return apply_filters( 'woocommerce_get_price_html', $price, $this );