wc_price filter-hookWC 1.0

Filters the string of price markup.

Usage

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(string)
Price HTML markup.
$price(string)
Formatted price.
$args(array)
Pass on the args.
$unformatted_price(float)
Price as float to allow plugins custom formatting. Since 3.2.0.
$original_price(float|string)
Original price as float, or empty string. Since 5.0.0.

Where the hook is called

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

Where the hook is used in WooCommerce

Usage not found.