Fix get_price_html_from_to() deprecation
WC_Product::get_price_html_from_to() was incorrectly using wc_format_sale_price() as its replacement in WC 2.7; however, wc_format_price_range() is a more suitable replacement.
This commit is contained in:
parent
9d513737ed
commit
a1cd7eee42
|
@ -266,8 +266,8 @@ abstract class WC_Abstract_Legacy_Product extends WC_Data {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get_price_html_from_to( $from, $to ) {
|
public function get_price_html_from_to( $from, $to ) {
|
||||||
wc_deprecated_function( 'WC_Product::get_price_html_from_to', '2.7', 'wc_format_sale_price' );
|
wc_deprecated_function( 'WC_Product::get_price_html_from_to', '2.7', 'wc_format_price_range' );
|
||||||
return apply_filters( 'woocommerce_get_price_html_from_to', wc_format_sale_price( $from, $to ), $from, $to, $this );
|
return apply_filters( 'woocommerce_get_price_html_from_to', wc_format_price_range( $from, $to ), $from, $to, $this );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue