woocommerce_get_price_html_from_to хук-фильтрWC 1.0

Устарел с версии 3.0.0. Больше не поддерживается и может быть удален. Используйте wc_format_sale_price.

Deprecated: 3.0.0 Use wc_format_sale_price instead.

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

Использование

add_filter( 'woocommerce_get_price_html_from_to', 'wp_kama_woocommerce_get_price_html_from_to_filter', 10, 3 );

/**
 * Function for `woocommerce_get_price_html_from_to` filter-hook.
 * 
 * @param string $from String or float to wrap with 'from' text
 * @param        $to   
 * @param        $that 
 *
 * @return string
 */
function wp_kama_woocommerce_get_price_html_from_to_filter( $from, $to, $that ){

	// filter...
	return $from;
}
$from(строка)
String or float to wrap with 'from' text
$to
-
$that
-

Список изменений

Устарела с 3.0.0 Use wc_format_sale_price instead.

Где вызывается хук

WC_Abstract_Legacy_Product::get_price_html_from_to()
woocommerce_get_price_html_from_to
woocommerce/includes/legacy/abstract-wc-legacy-product.php 300
return apply_filters( 'woocommerce_get_price_html_from_to', wc_format_sale_price( $from, $to ), $from, $to, $this );

Где используется хук в WooCommerce

Использование не найдено.