Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/paid-memberships-pro/includes/currencies.php
Keine Baseline-Datei – Diff nur gegen leer.
1
-
1
+
<?php
2
+
global $pmpro_currencies, $pmpro_default_currency;
3
+
4
+
$pmpro_default_currency = apply_filters("pmpro_default_currency", "USD");
5
+
6
+
$pmpro_currencies = array(
7
+
'USD' => __('US Dollars ($)', 'paid-memberships-pro' ),
8
+
'EUR' => array(
9
+
'name' => __('Euros (€)', 'paid-memberships-pro' ),
10
+
'symbol' => '€',
11
+
'position' => apply_filters("pmpro_euro_position", pmpro_euro_position_from_locale())
12
+
),
13
+
'GBP' => array(
14
+
'name' => __('Pounds Sterling (£)', 'paid-memberships-pro' ),
15
+
'symbol' => '£',
16
+
'position' => 'left'
17
+
),
18
+
'ALL' => array(
19
+
'name' => __('Albanian Lek (Lekë)', 'paid-memberships-pro' ),
20
+
'symbol' => ' Lek',
21
+
'decimals' => 0,
22
+
'thousands_separator' => ',',
23
+
'decimal_separator' => '.',
24
+
'position' => 'right',
25
+
),
26
+
'ARS' => __('Argentine Peso ($)', 'paid-memberships-pro' ),
27
+
'AUD' => __('Australian Dollars ($)', 'paid-memberships-pro' ),
28
+
'BDT' => array(
29
+
'name' => __('Bangladeshi taka (৳ )', 'paid-memberships-pro' ),
30
+
'symbol' => '৳ ',
31
+
'position' => 'left'
32
+
),
33
+
'BRL' => array(
34
+
'name' => __('Brazilian Real (R$)', 'paid-memberships-pro' ),
35
+
'symbol' => 'R$',
36
+
'position' => 'left'
37
+
),
38
+
'CAD' => __('Canadian Dollars ($)', 'paid-memberships-pro' ),
39
+
'CNY' => __('Chinese Yuan', 'paid-memberships-pro' ),
40
+
'CZK' => array(
41
+
'name' => __('Czech Koruna', 'paid-memberships-pro' ),
42
+
'decimals' => '2',
43
+
'thousands_separator' => ' ',
44
+
'decimal_separator' => ',',
45
+
'symbol' => ' Kč',
46
+
'position' => 'right',
47
+
),
48
+
'DKK' => array(
49
+
'name' =>__('Danish Krone', 'paid-memberships-pro' ),
50
+
'decimals' => '2',
51
+
'thousands_separator' => ' ',
52
+
'decimal_separator' => ',',
53
+
'symbol' => 'DKK ',
54
+
'position' => 'left',
55
+
),
56
+
'GHS' => array(
57
+
'name' => __('Ghanaian Cedi (₵)', 'paid-memberships-pro' ),
58
+
'symbol' => '₵',
59
+
'position' => 'left',
60
+
),
61
+
'HKD' => __('Hong Kong Dollar ($)', 'paid-memberships-pro' ),
62
+
'HUF' => __('Hungarian Forint', 'paid-memberships-pro' ),
63
+
'INR' => __('Indian Rupee', 'paid-memberships-pro' ),
64
+
'IDR' => __('Indonesia Rupiah', 'paid-memberships-pro' ),
65
+
'ILS' => __('Israeli Shekel', 'paid-memberships-pro' ),
66
+
'JPY' => array(
67
+
'name' => __('Japanese Yen (¥)', 'paid-memberships-pro' ),
68
+
'symbol' => '¥',
69
+
'position' => 'left',
70
+
'decimals' => 0,
71
+
),
72
+
'KES' => __('Kenyan Shilling', 'paid-memberships-pro' ),
73
+
'MYR' => __('Malaysian Ringgits', 'paid-memberships-pro' ),
74
+
'MXN' => __('Mexican Peso ($)', 'paid-memberships-pro' ),
75
+
'NGN' => __('Nigerian Naira (₦)', 'paid-memberships-pro' ),
76
+
'NZD' => __('New Zealand Dollar ($)', 'paid-memberships-pro' ),
77
+
'NOK' => __('Norwegian Krone', 'paid-memberships-pro' ),
78
+
'PHP' => __('Philippine Pesos', 'paid-memberships-pro' ),
79
+
'PLN' => array(
80
+
'name' => __('Polish Zloty', 'paid-memberships-pro' ),
81
+
'decimals' => '2',
82
+
'thousands_separator' => ' ',
83
+
'decimal_separator' => ',',
84
+
'symbol' => ' zł',
85
+
'position' => 'right',
86
+
),
87
+
'RON' => array(
88
+
'name' => __( 'Romanian Leu', 'paid-memberships-pro' ),
89
+
'decimals' => '2',
90
+
'thousands_separator' => '.',
91
+
'decimal_separator' => ',',
92
+
'symbol' => ' Lei',
93
+
'position' => 'right'
94
+
),
95
+
'RUB' => array(
96
+
'name' => __('Russian Ruble (₽)', 'paid-memberships-pro'),
97
+
'decimals' => '2',
98
+
'thousands_separator' => ' ',
99
+
'decimal_separator' => ',',
100
+
'symbol' => '₽',
101
+
'position' => 'right'
102
+
),
103
+
'SGD' => array(
104
+
'name' => __('Singapore Dollar ($)', 'paid-memberships-pro' ),
105
+
'symbol' => '$',
106
+
'position' => 'right'
107
+
),
108
+
'ZAR' => array(
109
+
'name' => __('South African Rand (R)', 'paid-memberships-pro' ),
110
+
'symbol' => 'R ',
111
+
'position' => 'left'
112
+
),
113
+
'KRW' => array(
114
+
'name' => __('South Korean Won', 'paid-memberships-pro' ),
115
+
'decimals' => 0,
116
+
),
117
+
'SEK' => __('Swedish Krona', 'paid-memberships-pro' ),
118
+
'CHF' => __('Swiss Franc', 'paid-memberships-pro' ),
119
+
'TWD' => __('Taiwan New Dollars', 'paid-memberships-pro' ),
120
+
'THB' => __('Thai Baht', 'paid-memberships-pro' ),
121
+
'TRY' => __('Turkish Lira', 'paid-memberships-pro' ),
122
+
'UAH' => array(
123
+
'name' => __('Ukrainian Hryvnia (₴)', 'paid-memberships-pro' ),
124
+
'decimals' => 0,
125
+
'thousands_separator' => '',
126
+
'decimal_separator' => ',',
127
+
'symbol' => '₴',
128
+
'position' => 'right'
129
+
),
130
+
'VND' => array(
131
+
'name' => __('Vietnamese Dong', 'paid-memberships-pro' ),
132
+
'decimals' => 0,
133
+
),
134
+
);
135
+
136
+
$pmpro_currencies = apply_filters("pmpro_currencies", $pmpro_currencies);
137
+
138
+
//stripe only supports a few (not using this anymore since 1.7.4)
139
+
global $pmpro_stripe_currencies;
140
+
$pmpro_stripe_currencies = array(
141
+
'USD' => __('US Dollars ($)', 'paid-memberships-pro' ),
142
+
'CAD' => __('Canadian Dollars ($)', 'paid-memberships-pro' ),
143
+
'GBP' => __('Pounds Sterling (£)', 'paid-memberships-pro' ),
144
+
'EUR' => __('Euros (€)', 'paid-memberships-pro' )
145
+
);
146
+
147
+
/**
148
+
* Get the Euro position based on locale.
149
+
* English uses left, others use right.
150
+
*/
151
+
function pmpro_euro_position_from_locale($position = 'right') {
152
+
$locale = get_locale();
153
+
if(strpos($locale, 'en_') === 0) {
154
+
$position = 'left';
155
+
}
156
+
return $position;
157
+
}
158
+
159
+
/**
160
+
* Get an array of data for a specified currency.
161
+
* Defaults to the current currency set in the global.
162
+
*/
163
+
function pmpro_get_currency( $currency = null ) {
164
+
global $pmpro_currency, $pmpro_currencies;
165
+
166
+
// Defaults
167
+
$currency_array = array(
168
+
'name' =>__('US Dollars ($)', 'paid-memberships-pro' ),
169
+
'decimals' => '2',
170
+
'thousands_separator' => ',',
171
+
'decimal_separator' => '.',
172
+
'symbol' => '$',
173
+
'position' => 'left',
174
+
);
175
+
176
+
if ( ! empty( $pmpro_currency ) ) {
177
+
if ( is_array( $pmpro_currencies[$pmpro_currency] ) ) {
178
+
$currency_array = array_merge( $currency_array, $pmpro_currencies[$pmpro_currency] );
179
+
} else {
180
+
$currency_array['name'] = $pmpro_currencies[$pmpro_currency];
181
+
}
182
+
}
183
+
184
+
return $currency_array;
185
+
}
186
+