📜  更改 woocommerce 货币符号 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:38.992000             🧑  作者: Mango

代码示例1
/**
 * Change a currency symbol
 */
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;
}