Cách thêm tiền tệ VNĐ vào woocommerce (oK0

https://levantoan.com/them-tien-te-vnd-vao-woocommerce/

//Thêm VNĐ cho woo
add_filter('woocommerce_currencies', 'add_my_currency');
function add_my_currency($currencies)
{
  $currencies['vnd'] = __('Việt Nam Đồng', 'woocommerce');
  return $currencies;
}
add_filter('woocommerce_currency_symbol', 'add_my_currency_symbol', 10, 2);
function add_my_currency_symbol($currency_symbol, $currency)
{
  switch ($currency) {
    case 'vnd':
      $currency_symbol = 'VNĐ';
      break;
  }
  return $currency_symbol;
}

Last updated