On my woocommerce website, I want to add a symbol ‘.-‘ after price wherever the price appears. I am using the code below in my functions.php file.
add_filter( 'woocommerce_get_price_html', 'kd_custom_price_message' );
add_filter( 'woocommerce_cart_item_price', 'kd_custom_price_message' );
function kd_custom_price_message( $price ) {
$afterPriceSymbol=".-";
return $price . $afterPriceSymbol;
}
As you can see I am using two filters –
-
woocommerce_get_price_html: for product display on shop and product page.
-
woocommerce_cart_item_price: ir changes the way product prices are shown in the cart table (not at checkout since only quantity / total price are shown here, not the unit price).
That adds symbols for price on shop page, product single page and cart page but does not add for price totals on cart page and checkout page.
So, my question is how I can add the symbol for price totals on cart page and checkout page.
Website reference
cart page
check out page