Skip to content

Instantly share code, notes, and snippets.

@neltseng
Last active September 22, 2016 15:54
Show Gist options
  • Save neltseng/3cfad3251b8256504d270ecbbd69c30a to your computer and use it in GitHub Desktop.
Save neltseng/3cfad3251b8256504d270ecbbd69c30a to your computer and use it in GitHub Desktop.
更換 WooCommerce 貨幣符號
// Change TWD symbol
add_filter('woocommerce_currency_symbol', 'cwp_change_currency_symbol', 10, 2);
function cwp_change_currency_symbol($currency_symbol, $currency) {
switch ($currency) {
case 'TWD':
$currency_symbol = '$'; //刪除 $ 或換成其它符號。
break;
}
return $currency_symbol;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment