woocommerce_format_sale_price filter-hookWC 3.0.0

Format a sale price for display.

Usage

add_filter( 'woocommerce_format_sale_price', 'wp_kama_woocommerce_format_sale_price_filter', 10, 2 );

/**
 * Function for `woocommerce_format_sale_price` filter-hook.
 * 
 * @param string $regular_price Regular price.
 * @param        $sale_price    
 *
 * @return string
 */
function wp_kama_woocommerce_format_sale_price_filter( $regular_price, $sale_price ){

	// filter...
	return $regular_price;
}
$regular_price(string)
Regular price.
$sale_price
-

Changelog

Since 3.0.0 Introduced.

Where the hook is called

wc_format_sale_price()
woocommerce_format_sale_price
woocommerce/includes/wc-formatting-functions.php 1276
return apply_filters( 'woocommerce_format_sale_price', $price, $regular_price, $sale_price );

Where the hook is used in WooCommerce

Usage not found.