Some countries or regions prefer to not have a thousands separator at all. Because that is only a minority of users, we’ve opted to not allow that in Give by default. But the example below will get it done if you need it.

Remove the Thousands Separator

/**
 * My custom Currency Format
 * 
 * @description Customize the currency format, pragmatically - CUSTOMIZE THE FUNCTION NAME
 * @param $formatted
 * @param $amount
 * @param $decimals
 * @param $decimal_sep
 * @param $thousands_sep
 *
 * @return string
 */
function my_give_custom_currency_format( $formatted, $amount, $decimals, $decimal_sep, $thousands_sep ) {

    $decimals      = 0;
    $thousands_sep = '';
    $formatted     = number_format( $amount, $decimals, $decimal_sep, $thousands_sep );

    return $formatted;

}

add_filter( 'give_format_amount', 'my_give_custom_currency_format', 10, 5 );

Note that this can be used to customize the currency format in a wide variety of ways. Removing the thousands separator is just one example which we have had some requests for.

Need Help Implementing this code?

If you need this functionality, but don’t know how to implement it on your WordPress website, see our resource on that here.