clean up
This commit is contained in:
parent
36dbe64170
commit
db5e2572f6
|
@ -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();
|
||||
|
|
|
@ -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 );
|
||||
|
|
Loading…
Reference in New Issue