wc_price_args
Format the price with a currency symbol.
Usage
add_filter( 'wc_price_args', 'wp_kama_wc_price_args_filter' ); /** * Function for `wc_price_args` filter-hook. * * @param float $price Raw price. * * @return float */ function wp_kama_wc_price_args_filter( $price ){ // filter... return $price; }
- $price(float)
- Raw price.
Where the hook is called
woocommerce/includes/wc-formatting-functions.php 566-579
$args = apply_filters( 'wc_price_args', wp_parse_args( $args, array( 'ex_tax_label' => false, 'currency' => '', 'decimal_separator' => wc_get_price_decimal_separator(), 'thousand_separator' => wc_get_price_thousand_separator(), 'decimals' => wc_get_price_decimals(), 'price_format' => get_woocommerce_price_format(), ) ) );