get_woocommerce_currency_symbol

Get Currency symbol.

Description

(string) get_woocommerce_currency_symbol( (string) $currency = '' ); 

Returns (string)

Parameters (1)

0. $currency — Optional. (string) => ''
The currency.

Usage

  1. if ( !function_exists( 'get_woocommerce_currency_symbol' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-core-functions.php'; 
  3.  
  4. // The currency. 
  5. $currency = ''; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = get_woocommerce_currency_symbol($currency); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-core-functions.php  
  1. function get_woocommerce_currency_symbol( $currency = '' ) { 
  2. if ( ! $currency ) { 
  3. $currency = get_woocommerce_currency(); 
  4.  
  5. $symbols = apply_filters( 'woocommerce_currency_symbols', array( 
  6. 'AED' => 'د.إ',  
  7. 'AFN' => '؋',  
  8. 'ALL' => 'L',  
  9. 'AMD' => 'AMD',  
  10. 'ANG' => 'ƒ',  
  11. 'AOA' => 'Kz',  
  12. 'ARS' => '$',  
  13. 'AUD' => '$',  
  14. 'AWG' => 'ƒ',  
  15. 'AZN' => 'AZN',  
  16. 'BAM' => 'KM',  
  17. 'BBD' => '$',  
  18. 'BDT' => '৳ ',  
  19. 'BGN' => 'лв.',  
  20. 'BHD' => '.د.ب',  
  21. 'BIF' => 'Fr',  
  22. 'BMD' => '$',  
  23. 'BND' => '$',  
  24. 'BOB' => 'Bs.',  
  25. 'BRL' => 'R$',  
  26. 'BSD' => '$',  
  27. 'BTC' => '฿',  
  28. 'BTN' => 'Nu.',  
  29. 'BWP' => 'P',  
  30. 'BYR' => 'Br',  
  31. 'BZD' => '$',  
  32. 'CAD' => '$',  
  33. 'CDF' => 'Fr',  
  34. 'CHF' => 'CHF',  
  35. 'CLP' => '$',  
  36. 'CNY' => '¥',  
  37. 'COP' => '$',  
  38. 'CRC' => '₡',  
  39. 'CUC' => '$',  
  40. 'CUP' => '$',  
  41. 'CVE' => '$',  
  42. 'CZK' => 'Kč',  
  43. 'DJF' => 'Fr',  
  44. 'DKK' => 'DKK',  
  45. 'DOP' => 'RD$',  
  46. 'DZD' => 'د.ج',  
  47. 'EGP' => 'EGP',  
  48. 'ERN' => 'Nfk',  
  49. 'ETB' => 'Br',  
  50. 'EUR' => '€',  
  51. 'FJD' => '$',  
  52. 'FKP' => '£',  
  53. 'GBP' => '£',  
  54. 'GEL' => 'ლ',  
  55. 'GGP' => '£',  
  56. 'GHS' => '₵',  
  57. 'GIP' => '£',  
  58. 'GMD' => 'D',  
  59. 'GNF' => 'Fr',  
  60. 'GTQ' => 'Q',  
  61. 'GYD' => '$',  
  62. 'HKD' => '$',  
  63. 'HNL' => 'L',  
  64. 'HRK' => 'Kn',  
  65. 'HTG' => 'G',  
  66. 'HUF' => 'Ft',  
  67. 'IDR' => 'Rp',  
  68. 'ILS' => '₪',  
  69. 'IMP' => '£',  
  70. 'INR' => '₹',  
  71. 'IQD' => 'ع.د',  
  72. 'IRR' => '﷼',  
  73. 'IRT' => 'تومان',  
  74. 'ISK' => 'kr.',  
  75. 'JEP' => '£',  
  76. 'JMD' => '$',  
  77. 'JOD' => 'د.ا',  
  78. 'JPY' => '¥',  
  79. 'KES' => 'KSh',  
  80. 'KGS' => 'сом',  
  81. 'KHR' => '៛',  
  82. 'KMF' => 'Fr',  
  83. 'KPW' => '₩',  
  84. 'KRW' => '₩',  
  85. 'KWD' => 'د.ك',  
  86. 'KYD' => '$',  
  87. 'KZT' => 'KZT',  
  88. 'LAK' => '₭',  
  89. 'LBP' => 'ل.ل',  
  90. 'LKR' => 'රු',  
  91. 'LRD' => '$',  
  92. 'LSL' => 'L',  
  93. 'LYD' => 'ل.د',  
  94. 'MAD' => 'د.م.',  
  95. 'MDL' => 'MDL',  
  96. 'MGA' => 'Ar',  
  97. 'MKD' => 'ден',  
  98. 'MMK' => 'Ks',  
  99. 'MNT' => '₮',  
  100. 'MOP' => 'P',  
  101. 'MRO' => 'UM',  
  102. 'MUR' => '₨',  
  103. 'MVR' => '.ރ',  
  104. 'MWK' => 'MK',  
  105. 'MXN' => '$',  
  106. 'MYR' => 'RM',  
  107. 'MZN' => 'MT',  
  108. 'NAD' => '$',  
  109. 'NGN' => '₦',  
  110. 'NIO' => 'C$',  
  111. 'NOK' => 'kr',  
  112. 'NPR' => '₨',  
  113. 'NZD' => '$',  
  114. 'OMR' => 'ر.ع.',  
  115. 'PAB' => 'B/.',  
  116. 'PEN' => 'S/.',  
  117. 'PGK' => 'K',  
  118. 'PHP' => '₱',  
  119. 'PKR' => '₨',  
  120. 'PLN' => 'zł',  
  121. 'PRB' => 'р.',  
  122. 'PYG' => '₲',  
  123. 'QAR' => 'ر.ق',  
  124. 'RMB' => '¥',  
  125. 'RON' => 'lei',  
  126. 'RSD' => 'дин.',  
  127. 'RUB' => '₽',  
  128. 'RWF' => 'Fr',  
  129. 'SAR' => 'ر.س',  
  130. 'SBD' => '$',  
  131. 'SCR' => '₨',  
  132. 'SDG' => 'ج.س.',  
  133. 'SEK' => 'kr',  
  134. 'SGD' => '$',  
  135. 'SHP' => '£',  
  136. 'SLL' => 'Le',  
  137. 'SOS' => 'Sh',  
  138. 'SRD' => '$',  
  139. 'SSP' => '£',  
  140. 'STD' => 'Db',  
  141. 'SYP' => 'ل.س',  
  142. 'SZL' => 'L',  
  143. 'THB' => '฿',  
  144. 'TJS' => 'ЅМ',  
  145. 'TMT' => 'm',  
  146. 'TND' => 'د.ت',  
  147. 'TOP' => 'T$',  
  148. 'TRY' => '₺',  
  149. 'TTD' => '$',  
  150. 'TWD' => 'NT$',  
  151. 'TZS' => 'Sh',  
  152. 'UAH' => '₴',  
  153. 'UGX' => 'UGX',  
  154. 'USD' => '$',  
  155. 'UYU' => '$',  
  156. 'UZS' => 'UZS',  
  157. 'VEF' => 'Bs F',  
  158. 'VND' => '₫',  
  159. 'VUV' => 'Vt',  
  160. 'WST' => 'T',  
  161. 'XAF' => 'Fr',  
  162. 'XCD' => '$',  
  163. 'XOF' => 'Fr',  
  164. 'XPF' => 'Fr',  
  165. 'YER' => '﷼',  
  166. 'ZAR' => 'R',  
  167. 'ZMW' => 'ZK',  
  168. ) ); 
  169.  
  170. $currency_symbol = isset( $symbols[ $currency ] ) ? $symbols[ $currency ] : ''; 
  171.  
  172. return apply_filters( 'woocommerce_currency_symbol', $currency_symbol, $currency );