woocommerce_price_trim_zeros filter-hookWC 1.0

Filter formatted price.

Usage

add_filter( 'woocommerce_price_trim_zeros', 'wp_kama_woocommerce_price_trim_zeros_filter' );

/**
 * Function for `woocommerce_price_trim_zeros` filter-hook.
 * 
 * @param float $formatted_price Formatted price.
 *
 * @return float
 */
function wp_kama_woocommerce_price_trim_zeros_filter( $formatted_price ){

	// filter...
	return $formatted_price;
}
$formatted_price(float)
Formatted price.

Where the hook is called

wc_price()
woocommerce_price_trim_zeros
woocommerce/includes/wc-formatting-functions.php 607
if ( apply_filters( 'woocommerce_price_trim_zeros', false ) && $args['decimals'] > 0 ) {

Where the hook is used in WooCommerce

Usage not found.