formatted_woocommerce_price filter-hookWC 1.0

Filter formatted price.

Usage

add_filter( 'formatted_woocommerce_price', 'wp_kama_formatted_woocommerce_price_filter', 10, 6 );

/**
 * Function for `formatted_woocommerce_price` filter-hook.
 * 
 * @param float        $formatted_price    Formatted price.
 * @param float        $price              Unformatted price.
 * @param int          $decimals           Number of decimals.
 * @param string       $decimal_separator  Decimal separator.
 * @param string       $thousand_separator Thousand separator.
 * @param float|string $original_price     Original price as float, or empty string. Since 5.0.0.
 *
 * @return float
 */
function wp_kama_formatted_woocommerce_price_filter( $formatted_price, $price, $decimals, $decimal_separator, $thousand_separator, $original_price ){

	// filter...
	return $formatted_price;
}
$formatted_price(float)
Formatted price.
$price(float)
Unformatted price.
$decimals(int)
Number of decimals.
$decimal_separator(string)
Decimal separator.
$thousand_separator(string)
Thousand separator.
$original_price(float|string)
Original price as float, or empty string. Since 5.0.0.

Where the hook is called

wc_price()
formatted_woocommerce_price
woocommerce/includes/wc-formatting-functions.php 607
$price = apply_filters( 'formatted_woocommerce_price', number_format( $price, $args['decimals'], $args['decimal_separator'], $args['thousand_separator'] ), $price, $args['decimals'], $args['decimal_separator'], $args['thousand_separator'], $original_price );

Where the hook is used in WooCommerce

Usage not found.