WC_Abstract_Legacy_Product::get_price_html_from_to()
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.
Method of the class: WC_Abstract_Legacy_Product{}
Hooks from the method
Return
String
.
Usage
$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
Changelog
Deprecated since 3.0.0 | Use wc_format_sale_price instead. |
WC_Abstract_Legacy_Product::get_price_html_from_to() WC Abstract Legacy Product::get price html from to code WC 8.7.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 ); }