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

Filters the string of price markup.

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

add_filter( 'wc_price', 'wp_kama_wc_price_filter', 10, 5 );

/**
 * Function for `wc_price` filter-hook.
 * 
 * @param string       $return            Price HTML markup.
 * @param string       $price             Formatted price.
 * @param array        $args              Pass on the args.
 * @param float        $unformatted_price Price as float to allow plugins custom formatting. Since 3.2.0.
 * @param float|string $original_price    Original price as float, or empty string. Since 5.0.0.
 *
 * @return string
 */
function wp_kama_wc_price_filter( $return, $price, $args, $unformatted_price, $original_price ){

	// filter...
	return $return;
}
$return(строка)
Price HTML markup.
$price(строка)
Formatted price.
$args(массив)
Pass on the args.
$unformatted_price(float)
Price as float to allow plugins custom formatting. Since 3.2.0.
$original_price(float|строка)
Original price as float, or empty string. Since 5.0.0.

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

wc_price()
wc_price
woocommerce/includes/wc-formatting-functions.php 627
return apply_filters( 'wc_price', $return, $price, $args, $unformatted_price, $original_price );

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

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