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:
Brent Shepherd 2017-01-19 13:51:23 -08:00
parent 9d513737ed
commit a1cd7eee42
1 changed files with 2 additions and 2 deletions

View File

@ -266,8 +266,8 @@ abstract class WC_Abstract_Legacy_Product extends WC_Data {
* @return string
*/
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' );
return apply_filters( 'woocommerce_get_price_html_from_to', wc_format_sale_price( $from, $to ), $from, $to, $this );
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_price_range( $from, $to ), $from, $to, $this );
}
/**