By default, the calculation, and number field values don’t have a currency symbol in the cart/cart page. If you’d like the values to have your set currency symbol, then here’s a snippet you can use:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Add the default currency field to calculation values in cart **/ | |
add_filter( 'pewc_filter_item_value_in_cart', function( $field_value, $field ) { | |
if ( $field['type'] == "calculation" ) { | |
$field_value = get_woocommerce_currency_symbol() . $field_value; | |
} | |
return $field_value; | |
}, 10, 2 ); |
Here’s how to add your snippet: How to add a code snippet to your site