Home / functions.php / Change the currency symbol in WooCommerce
  • How to Change the currency symbol in WooCommerce

    rename-a-country-in-woocommerce

    If you are looking for a way to use code to change the currency symbol this little snippet will do the trick for you. Just add this to the functions.php of your wordpress theme and you are ready to go.

    ( click code to copy )

    wordpress snippet : PHP

    <>
    add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);
    function change_existing_currency_symbol( $currency_symbol, $currency ) {
      switch( $currency ) {
        case 'AUD': $currency_symbol = 'AUD$'; break;
      }
      return $currency_symbol;
    }
    

    ( WordPress codex functions, hooks, in this snippet. )

    add_filter, _e, _ex,