I found the hooks you were looking for by reviewing the WooCommerce template source code (review-order.php
). Here’s the code:
add_filter( 'woocommerce_get_price_html', 'kd_custom_price_message' );
add_filter( 'woocommerce_cart_item_price', 'kd_custom_price_message' );
add_filter( 'woocommerce_cart_item_subtotal', 'kd_custom_price_message' ); // added
add_filter( 'woocommerce_cart_subtotal', 'kd_custom_price_message' ); // added
add_filter( 'woocommerce_cart_total', 'kd_custom_price_message' ); // added
function kd_custom_price_message( $price ) {
$afterPriceSymbol=".-";
return $price . $afterPriceSymbol;
}
It’s worth noting that WooCommerce > Settings > Currency Options > Number of Decimals is set to 0 in this example.