WordPress at a glance
function is not described

WC_Abstract_Legacy_Product::get_price_html_from_to() public WC 1.0

Deprecated from version 3.0.0. It is no longer supported and can be removed in future releases. Use wc_format_sale_price instead.

Functions for getting parts of a price, in html, used by get_price_html.

{} It's a method of the class: WC_Abstract_Legacy_Product{}

Hooks from the method



$WC_Abstract_Legacy_Product = new WC_Abstract_Legacy_Product();
$WC_Abstract_Legacy_Product->get_price_html_from_to( $from, $to );
$from(string) (required)
String or float to wrap with 'from' text
$to(mixed) (required)
String or float to wrap with 'to' text


Deprecated Since 3.0.0 Use wc_format_sale_price instead.

Code of WC_Abstract_Legacy_Product::get_price_html_from_to() WC 5.0.0

public function get_price_html_from_to( $from, $to ) {
	wc_deprecated_function( 'WC_Product::get_price_html_from_to', '3.0', 'wc_format_sale_price' );
	return apply_filters( 'woocommerce_get_price_html_from_to', wc_format_sale_price( $from, $to ), $from, $to, $this );