/includes/currencies.php

  1. <?php 
  2. //thanks jigoshop 
  3. global $pmpro_currencies, $pmpro_default_currency; 
  4. $pmpro_default_currency = apply_filters("pmpro_default_currency", "USD"); 
  5.  
  6. function pmpro_euro_position_from_locale($position = 'right') 
  7. $locale = get_locale(); 
  8. if(strpos($locale, 'en_') === 0) 
  9. $position = 'left'; 
  10. return $position; 
  11.  
  12. $pmpro_currencies = array(  
  13. 'USD' => __('US Dollars ($)', 'paid-memberships-pro' ),  
  14. 'EUR' => array( 
  15. 'name' => __('Euros (€)', 'paid-memberships-pro' ),  
  16. 'symbol' => '€',  
  17. 'position' => apply_filters("pmpro_euro_position", pmpro_euro_position_from_locale()) 
  18. ),  
  19. 'GBP' => array( 
  20. 'name' => __('Pounds Sterling (£)', 'paid-memberships-pro' ),  
  21. 'symbol' => '£',  
  22. 'position' => 'left' 
  23. ),  
  24. 'ARS' => __('Argentine Peso ($)', 'paid-memberships-pro' ),  
  25. 'AUD' => __('Australian Dollars ($)', 'paid-memberships-pro' ),  
  26. 'BRL' => array( 
  27. 'name' => __('Brazilian Real (R$)', 'paid-memberships-pro' ),  
  28. 'symbol' => 'R$',  
  29. 'position' => 'left' 
  30. ),  
  31. 'CAD' => __('Canadian Dollars ($)', 'paid-memberships-pro' ),  
  32. 'CNY' => __('Chinese Yuan', 'paid-memberships-pro' ),  
  33. 'CZK' => array( 
  34. 'name' => __('Czech Koruna', 'paid-memberships-pro' ),  
  35. 'decimals' => '0',  
  36. 'thousands_separator' => ' ',  
  37. 'decimal_separator' => ', ',  
  38. 'symbol' => ' K*',  
  39. 'position' => 'right',  
  40. ),  
  41. 'DKK' => __('Danish Krone', 'paid-memberships-pro' ),  
  42. 'HKD' => __('Hong Kong Dollar ($)', 'paid-memberships-pro' ),  
  43. 'HUF' => __('Hungarian Forint', 'paid-memberships-pro' ),  
  44. 'INR' => __('Indian Rupee', 'paid-memberships-pro' ),  
  45. 'IDR' => __('Indonesia Rupiah', 'paid-memberships-pro' ),  
  46. 'ILS' => __('Israeli Shekel', 'paid-memberships-pro' ),  
  47. 'JPY' => array( 
  48. 'name' => __('Japanese Yen (¥)', 'paid-memberships-pro' ),  
  49. 'symbol' => '¥',  
  50. 'position' => 'right',  
  51. 'decimals' => 0,  
  52. ),  
  53. 'MYR' => __('Malaysian Ringgits', 'paid-memberships-pro' ),  
  54. 'MXN' => __('Mexican Peso ($)', 'paid-memberships-pro' ),  
  55. 'NGN' => __('Nigerian Naira (₦)', 'paid-memberships-pro' ),  
  56. 'NZD' => __('New Zealand Dollar ($)', 'paid-memberships-pro' ),  
  57. 'NOK' => __('Norwegian Krone', 'paid-memberships-pro' ),  
  58. 'PHP' => __('Philippine Pesos', 'paid-memberships-pro' ),  
  59. 'PLN' => __('Polish Zloty', 'paid-memberships-pro' ),  
  60. 'SGD' => array( 
  61. 'name' => __('Singapore Dollar ($)', 'paid-memberships-pro' ),  
  62. 'symbol' => '$',  
  63. 'position' => 'right' 
  64. ),  
  65. 'ZAR' => array( 
  66. 'name' => __('South African Rand (R)', 'paid-memberships-pro' ),  
  67. 'symbol' => 'R ',  
  68. 'position' => 'left' 
  69. ),  
  70. 'KRW' => array( 
  71. 'name' => __('South Korean Won', 'paid-memberships-pro' ),  
  72. 'decimals' => 0,  
  73. ),  
  74. 'SEK' => __('Swedish Krona', 'paid-memberships-pro' ),  
  75. 'CHF' => __('Swiss Franc', 'paid-memberships-pro' ),  
  76. 'TWD' => __('Taiwan New Dollars', 'paid-memberships-pro' ),  
  77. 'THB' => __('Thai Baht', 'paid-memberships-pro' ),  
  78. 'TRY' => __('Turkish Lira', 'paid-memberships-pro' ),  
  79. 'VND' => array( 
  80. 'name' => __('Vietnamese Dong', 'paid-memberships-pro' ),  
  81. 'decimals' => 0,  
  82. ),  
  83. ); 
  84.  
  85. $pmpro_currencies = apply_filters("pmpro_currencies", $pmpro_currencies); 
  86.  
  87. //stripe only supports a few (not using this anymore since 1.7.4) 
  88. global $pmpro_stripe_currencies; 
  89. $pmpro_stripe_currencies = array( 
  90. 'USD' => __('US Dollars ($)', 'paid-memberships-pro' ),  
  91. 'CAD' => __('Canadian Dollars ($)', 'paid-memberships-pro' ),  
  92. 'GBP' => __('Pounds Sterling (£)', 'paid-memberships-pro' ),  
  93. 'EUR' => __('Euros (€)', 'paid-memberships-pro' ) 
  94. ); 
  95. ?> 
.