Thread Starter
Pablos
(@spamiky)
I found info about changing the functions.php file, but I don’t know where to set what.
function mphb_format_price( $price, $atts = array() ){
$defaultAtts = array(
'decimal_separator' => MPHB()->settings()->currency()->getPriceDecimalsSeparator(),
'thousand_separator' => MPHB()->settings()->currency()->getPriceThousandSeparator(),
'decimals' => MPHB()->settings()->currency()->getPriceDecimalsCount(),
'currency_position' => MPHB()->settings()->currency()->getCurrencyPosition(),
'currency_symbol' => MPHB()->settings()->currency()->getCurrencySymbol(),
'literal_free' => false,
'trim_zeros' => true,
'period' => false,
'period_title' => '',
'period_nights' => 1,
'as_html' => true
);
Hello @spamiky!
Sorry for the late reply.
I assume you’re referring to a comma separator that’s used in the price, and if yes, it’s possible to edit/remove it by adding the following code to the functions.php file of your theme. We recommend installing a child theme in order not to lose the changes you add to the functions.php file. Here’s the code:
function theme_default_option_mphb_decimals_separator() {
return ' new separator here ';
}
add_filter('default_option_mphb_decimals_separator','theme_default_option_mphb_decimals_separator');
Thread Starter
Pablos
(@spamiky)
Hello, I’m sorry but it’s not working. I have a Mesmerize template.
I put in the file: wordpres/wp-content/themes/mesmerize/functions.php
Hello there!
Sorry, my bad. Here’s the code that you may need to use instead of the previous one:
function theme_default_option_mphb_thousand_separator() {
return ' new separator here ';
}
add_filter( 'default_option_mphb_thousand_separator','theme_default_option_mphb_thousand_separator');