PaymentGateways
1 year ago
AdminMenu.php
1 year ago
BillingController.php
1 year ago
CartController.php
1 year ago
CheckoutController.php
1 year ago
CouponController.php
1 year ago
Ecommerce.php
1 year ago
EmailController.php
1 year ago
HooksHandler.php
1 year ago
OptionKeys.php
1 year ago
OrderActivitiesController.php
1 year ago
OrderController.php
1 year ago
PaymentHandler.php
1 year ago
Settings.php
1 year ago
Tax.php
1 year ago
currency.php
1 year ago
currency.php
1168 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Currency List |
| 4 | * |
| 5 | * @package Tutor\Includes |
| 6 | * @author Themeum <support@themeum.com> |
| 7 | * @link https=>//themeum.com |
| 8 | * @since 3.0.0 |
| 9 | */ |
| 10 | |
| 11 | if ( ! defined( 'ABSPATH' ) ) { |
| 12 | exit; |
| 13 | } |
| 14 | |
| 15 | if ( ! function_exists( 'tutor_currencies' ) ) { |
| 16 | /** |
| 17 | * Get tutor currencies |
| 18 | * |
| 19 | * @since 3.0.0 |
| 20 | * |
| 21 | * @return array |
| 22 | */ |
| 23 | function get_tutor_currencies() { |
| 24 | $currencies = array( |
| 25 | array( |
| 26 | 'code' => 'USD', |
| 27 | 'symbol' => '$', |
| 28 | 'name' => 'US Dollar', |
| 29 | 'locale' => 'en-us', |
| 30 | 'numeric_code' => 840, |
| 31 | ), |
| 32 | array( |
| 33 | 'code' => 'EUR', |
| 34 | 'symbol' => "€", |
| 35 | 'name' => 'Euro', |
| 36 | 'locale' => 'en-eu', |
| 37 | 'numeric_code' => 978, |
| 38 | ), |
| 39 | array( |
| 40 | 'code' => 'GBP', |
| 41 | 'symbol' => "£", |
| 42 | 'name' => 'British Pound', |
| 43 | 'locale' => 'en-gb', |
| 44 | 'numeric_code' => 826, |
| 45 | ), |
| 46 | array( |
| 47 | 'code' => 'CAD', |
| 48 | 'symbol' => '$', |
| 49 | 'name' => 'Canadian Dollar', |
| 50 | 'locale' => 'en-ca', |
| 51 | 'numeric_code' => 124, |
| 52 | ), |
| 53 | array( |
| 54 | 'code' => 'AED', |
| 55 | 'symbol' => 'AED', |
| 56 | 'name' => 'UAE Dirham', |
| 57 | 'locale' => 'ar-ae', |
| 58 | 'numeric_code' => 784, |
| 59 | ), |
| 60 | array( |
| 61 | 'code' => 'AFN', |
| 62 | 'symbol' => "؋", |
| 63 | 'name' => 'Afghanistan Afghani', |
| 64 | 'locale' => 'fa-af', |
| 65 | 'numeric_code' => 971, |
| 66 | ), |
| 67 | array( |
| 68 | 'code' => 'ALL', |
| 69 | 'symbol' => 'Lek', |
| 70 | 'name' => "Albanian Lek\u00eb", |
| 71 | 'locale' => 'sq-al', |
| 72 | 'numeric_code' => 8, |
| 73 | ), |
| 74 | array( |
| 75 | 'code' => 'AMD', |
| 76 | 'symbol' => 'AMD', |
| 77 | 'name' => 'Armenian Dram', |
| 78 | 'locale' => 'hy-am', |
| 79 | 'numeric_code' => 51, |
| 80 | ), |
| 81 | array( |
| 82 | 'code' => 'ANG', |
| 83 | 'symbol' => "ƒ", |
| 84 | 'name' => 'Netherlands Antillean Gulden', |
| 85 | 'locale' => 'nl-an', |
| 86 | 'numeric_code' => 532, |
| 87 | ), |
| 88 | array( |
| 89 | 'code' => 'AOA', |
| 90 | 'symbol' => 'Kz', |
| 91 | 'name' => 'Angolan Kwanza', |
| 92 | 'locale' => 'pt-ao', |
| 93 | 'numeric_code' => 973, |
| 94 | ), |
| 95 | array( |
| 96 | 'code' => 'ARS', |
| 97 | 'symbol' => '$', |
| 98 | 'name' => 'Argentine Peso', |
| 99 | 'locale' => 'es-ar', |
| 100 | 'numeric_code' => 32, |
| 101 | ), |
| 102 | array( |
| 103 | 'code' => 'AUD', |
| 104 | 'symbol' => '$', |
| 105 | 'name' => 'Australian Dollar', |
| 106 | 'locale' => 'en-au', |
| 107 | 'numeric_code' => 36, |
| 108 | ), |
| 109 | array( |
| 110 | 'code' => 'AWG', |
| 111 | 'symbol' => 'AWG', |
| 112 | 'name' => 'Aruban Florin', |
| 113 | 'locale' => 'nl-aw', |
| 114 | 'numeric_code' => 533, |
| 115 | ), |
| 116 | array( |
| 117 | 'code' => 'AZN', |
| 118 | 'symbol' => "₼", |
| 119 | 'name' => 'Azerbaijani Manat', |
| 120 | 'locale' => 'az-az', |
| 121 | 'numeric_code' => 944, |
| 122 | ), |
| 123 | array( |
| 124 | 'code' => 'BAM', |
| 125 | 'symbol' => 'KM', |
| 126 | 'name' => 'Bosnia and Herzegovina Convertible Mark', |
| 127 | 'locale' => 'bs-ba', |
| 128 | 'numeric_code' => 977, |
| 129 | ), |
| 130 | array( |
| 131 | 'code' => 'BBD', |
| 132 | 'symbol' => '$', |
| 133 | 'name' => 'Barbadian Dollar', |
| 134 | 'locale' => 'en-bb', |
| 135 | 'numeric_code' => 52, |
| 136 | ), |
| 137 | array( |
| 138 | 'code' => 'BDT', |
| 139 | 'symbol' => "৳", |
| 140 | 'name' => 'Bangladeshi Taka', |
| 141 | 'locale' => 'bn-bd', |
| 142 | 'numeric_code' => 50, |
| 143 | ), |
| 144 | array( |
| 145 | 'code' => 'BGN', |
| 146 | 'symbol' => 'BGN', |
| 147 | 'name' => 'Bulgarian Leva', |
| 148 | 'locale' => 'bg-bg', |
| 149 | 'numeric_code' => 975, |
| 150 | ), |
| 151 | array( |
| 152 | 'code' => 'BHD', |
| 153 | 'symbol' => 'BHD', |
| 154 | 'name' => 'Bahraini Dinar', |
| 155 | 'locale' => 'ar-bh', |
| 156 | 'numeric_code' => 48, |
| 157 | ), |
| 158 | array( |
| 159 | 'code' => 'BIF', |
| 160 | 'symbol' => 'FBu', |
| 161 | 'name' => 'Burundi Franc', |
| 162 | 'locale' => 'fr-bi', |
| 163 | 'numeric_code' => 108, |
| 164 | ), |
| 165 | array( |
| 166 | 'code' => 'BMD', |
| 167 | 'symbol' => 'BD$', |
| 168 | 'name' => 'Bermudian Dollar', |
| 169 | 'locale' => 'en-bm', |
| 170 | 'numeric_code' => 60, |
| 171 | ), |
| 172 | array( |
| 173 | 'code' => 'BND', |
| 174 | 'symbol' => 'B$', |
| 175 | 'name' => 'Brunei Dollar', |
| 176 | 'locale' => 'ms-bn', |
| 177 | 'numeric_code' => 96, |
| 178 | ), |
| 179 | array( |
| 180 | 'code' => 'BOB', |
| 181 | 'symbol' => 'Bs', |
| 182 | 'name' => 'Bolivian Boliviano', |
| 183 | 'locale' => 'es-bo', |
| 184 | 'numeric_code' => 68, |
| 185 | ), |
| 186 | array( |
| 187 | 'code' => 'BRL', |
| 188 | 'symbol' => 'R$', |
| 189 | 'name' => 'Brazilian Real', |
| 190 | 'locale' => 'pt-br', |
| 191 | 'numeric_code' => 986, |
| 192 | ), |
| 193 | array( |
| 194 | 'code' => 'BSD', |
| 195 | 'symbol' => 'B$', |
| 196 | 'name' => 'Bahamian Dollar', |
| 197 | 'locale' => 'en-bs', |
| 198 | 'numeric_code' => 44, |
| 199 | ), |
| 200 | array( |
| 201 | 'code' => 'BTN', |
| 202 | 'symbol' => 'Nu.', |
| 203 | 'name' => 'Bhutanese Ngultrum', |
| 204 | 'locale' => 'dz-bt', |
| 205 | 'numeric_code' => 64, |
| 206 | ), |
| 207 | array( |
| 208 | 'code' => 'BWP', |
| 209 | 'symbol' => 'P', |
| 210 | 'name' => 'Botswana Pula', |
| 211 | 'locale' => 'en-bw', |
| 212 | 'numeric_code' => 72, |
| 213 | ), |
| 214 | array( |
| 215 | 'code' => 'BYN', |
| 216 | 'symbol' => 'BYN', |
| 217 | 'name' => 'Belarusian Ruble', |
| 218 | 'locale' => 'be-by', |
| 219 | 'numeric_code' => 933, |
| 220 | ), |
| 221 | array( |
| 222 | 'code' => 'BZD', |
| 223 | 'symbol' => '$', |
| 224 | 'name' => 'Belize Dollar', |
| 225 | 'locale' => 'en-bz', |
| 226 | 'numeric_code' => 84, |
| 227 | ), |
| 228 | array( |
| 229 | 'code' => 'CDF', |
| 230 | 'symbol' => 'FDC', |
| 231 | 'name' => 'Congolese Franc', |
| 232 | 'locale' => 'fr-cd', |
| 233 | 'numeric_code' => 976, |
| 234 | ), |
| 235 | array( |
| 236 | 'code' => 'CHF', |
| 237 | 'symbol' => 'CHF', |
| 238 | 'name' => 'Swiss Franc', |
| 239 | 'locale' => 'fr-ch', |
| 240 | 'numeric_code' => 756, |
| 241 | ), |
| 242 | array( |
| 243 | 'code' => 'CLP', |
| 244 | 'symbol' => '$', |
| 245 | 'name' => 'Chilean Peso', |
| 246 | 'locale' => 'es-cl', |
| 247 | 'numeric_code' => 152, |
| 248 | ), |
| 249 | array( |
| 250 | 'code' => 'CNY', |
| 251 | 'symbol' => "¥", |
| 252 | 'name' => 'Chinese\/Yuan Renminbi', |
| 253 | 'locale' => 'zh-cn', |
| 254 | 'numeric_code' => 156, |
| 255 | ), |
| 256 | array( |
| 257 | 'code' => 'COP', |
| 258 | 'symbol' => '$', |
| 259 | 'name' => 'Colombian Peso', |
| 260 | 'locale' => 'es-co', |
| 261 | 'numeric_code' => 170, |
| 262 | ), |
| 263 | array( |
| 264 | 'code' => 'CRC', |
| 265 | 'symbol' => "₡", |
| 266 | 'name' => 'Costa Rican Colon', |
| 267 | 'locale' => 'es-cr', |
| 268 | 'numeric_code' => 188, |
| 269 | ), |
| 270 | array( |
| 271 | 'code' => 'CUP', |
| 272 | 'symbol' => '$', |
| 273 | 'name' => 'Cuban Peso', |
| 274 | 'locale' => 'es-cu', |
| 275 | 'numeric_code' => 192, |
| 276 | ), |
| 277 | array( |
| 278 | 'code' => 'CVE', |
| 279 | 'symbol' => 'CVE', |
| 280 | 'name' => 'Cape Verdean Escudo', |
| 281 | 'locale' => 'pt-cv', |
| 282 | 'numeric_code' => 132, |
| 283 | ), |
| 284 | array( |
| 285 | 'code' => 'CZK', |
| 286 | 'symbol' => "Kč", |
| 287 | 'name' => 'Czech Koruna', |
| 288 | 'locale' => 'cs-cz', |
| 289 | 'numeric_code' => 203, |
| 290 | ), |
| 291 | array( |
| 292 | 'code' => 'DJF', |
| 293 | 'symbol' => 'Fdj', |
| 294 | 'name' => 'Djiboutian Franc', |
| 295 | 'locale' => 'fr-dj', |
| 296 | 'numeric_code' => 262, |
| 297 | ), |
| 298 | array( |
| 299 | 'code' => 'DKK', |
| 300 | 'symbol' => 'Kr.', |
| 301 | 'name' => 'Danish Krone', |
| 302 | 'locale' => 'da-dk', |
| 303 | 'numeric_code' => 208, |
| 304 | ), |
| 305 | array( |
| 306 | 'code' => 'DOP', |
| 307 | 'symbol' => '$', |
| 308 | 'name' => 'Dominican Peso', |
| 309 | 'locale' => 'es-do', |
| 310 | 'numeric_code' => 214, |
| 311 | ), |
| 312 | array( |
| 313 | 'code' => 'DZD', |
| 314 | 'symbol' => 'DZD', |
| 315 | 'name' => 'Algerian Dinar', |
| 316 | 'locale' => 'ar-dz', |
| 317 | 'numeric_code' => 12, |
| 318 | ), |
| 319 | array( |
| 320 | 'code' => 'EEK', |
| 321 | 'symbol' => 'KR', |
| 322 | 'name' => 'Estonian Kroon', |
| 323 | 'locale' => 'et-ee', |
| 324 | 'numeric_code' => 233, |
| 325 | ), |
| 326 | array( |
| 327 | 'code' => 'EGP', |
| 328 | 'symbol' => "£", |
| 329 | 'name' => 'Egyptian Pound', |
| 330 | 'locale' => 'ar-eg', |
| 331 | 'numeric_code' => 818, |
| 332 | ), |
| 333 | array( |
| 334 | 'code' => 'ERN', |
| 335 | 'symbol' => 'ERN', |
| 336 | 'name' => 'Eritrean Nakfa', |
| 337 | 'locale' => 'ti-er', |
| 338 | 'numeric_code' => 232, |
| 339 | ), |
| 340 | array( |
| 341 | 'code' => 'ETB', |
| 342 | 'symbol' => 'ETB', |
| 343 | 'name' => 'Ethiopian Birr', |
| 344 | 'locale' => 'am-et', |
| 345 | 'numeric_code' => 230, |
| 346 | ), |
| 347 | array( |
| 348 | 'code' => 'FJD', |
| 349 | 'symbol' => '$', |
| 350 | 'name' => 'Fijian Dollar', |
| 351 | 'locale' => 'en-fj', |
| 352 | 'numeric_code' => 242, |
| 353 | ), |
| 354 | array( |
| 355 | 'code' => 'FKP', |
| 356 | 'symbol' => "£", |
| 357 | 'name' => 'Falkland Islands Pound', |
| 358 | 'locale' => 'en-fk', |
| 359 | 'numeric_code' => 238, |
| 360 | ), |
| 361 | array( |
| 362 | 'code' => 'GEL', |
| 363 | 'symbol' => 'GEL', |
| 364 | 'name' => 'Georgian Lari', |
| 365 | 'locale' => 'ka-ge', |
| 366 | 'numeric_code' => 981, |
| 367 | ), |
| 368 | array( |
| 369 | 'code' => 'GHS', |
| 370 | 'symbol' => "₵", |
| 371 | 'name' => 'Ghanaian Cedi', |
| 372 | 'locale' => 'en-gh', |
| 373 | 'numeric_code' => 936, |
| 374 | ), |
| 375 | array( |
| 376 | 'code' => 'GIP', |
| 377 | 'symbol' => "£", |
| 378 | 'name' => 'Gibraltar Pound', |
| 379 | 'locale' => 'en-gi', |
| 380 | 'numeric_code' => 292, |
| 381 | ), |
| 382 | array( |
| 383 | 'code' => 'GMD', |
| 384 | 'symbol' => 'D', |
| 385 | 'name' => 'Gambian Dalasi', |
| 386 | 'locale' => 'en-gm', |
| 387 | 'numeric_code' => 270, |
| 388 | ), |
| 389 | array( |
| 390 | 'code' => 'GNF', |
| 391 | 'symbol' => 'FG', |
| 392 | 'name' => 'Guinean franc', |
| 393 | 'locale' => 'fr-gn', |
| 394 | 'numeric_code' => 324, |
| 395 | ), |
| 396 | array( |
| 397 | 'code' => 'XAF', |
| 398 | 'symbol' => 'F.CFA', |
| 399 | 'name' => 'Central African CFA Franc', |
| 400 | 'locale' => 'fr-xa', |
| 401 | 'numeric_code' => 950, |
| 402 | ), |
| 403 | array( |
| 404 | 'code' => 'GTQ', |
| 405 | 'symbol' => 'Q', |
| 406 | 'name' => 'Guatemalan Quetzal', |
| 407 | 'locale' => 'es-gt', |
| 408 | 'numeric_code' => 320, |
| 409 | ), |
| 410 | array( |
| 411 | 'code' => 'GYD', |
| 412 | 'symbol' => '$', |
| 413 | 'name' => 'Guyanese Dollar', |
| 414 | 'locale' => 'en-gy', |
| 415 | 'numeric_code' => 328, |
| 416 | ), |
| 417 | array( |
| 418 | 'code' => 'HKD', |
| 419 | 'symbol' => '$', |
| 420 | 'name' => 'Hong Kong Dollar', |
| 421 | 'locale' => 'zh-hk', |
| 422 | 'numeric_code' => 344, |
| 423 | ), |
| 424 | array( |
| 425 | 'code' => 'HNL', |
| 426 | 'symbol' => 'L', |
| 427 | 'name' => 'Honduran Lempira', |
| 428 | 'locale' => 'es-hn', |
| 429 | 'numeric_code' => 340, |
| 430 | ), |
| 431 | array( |
| 432 | 'code' => 'HRK', |
| 433 | 'symbol' => 'kn', |
| 434 | 'name' => 'Croatian Kuna', |
| 435 | 'locale' => 'hr-hr', |
| 436 | 'numeric_code' => 191, |
| 437 | ), |
| 438 | array( |
| 439 | 'code' => 'HTG', |
| 440 | 'symbol' => 'G', |
| 441 | 'name' => 'Haitian Gourde', |
| 442 | 'locale' => 'ht-ht', |
| 443 | 'numeric_code' => 332, |
| 444 | ), |
| 445 | array( |
| 446 | 'code' => 'HUF', |
| 447 | 'symbol' => 'Ft', |
| 448 | 'name' => 'Hungarian Forint', |
| 449 | 'locale' => 'hu-hu', |
| 450 | 'numeric_code' => 348, |
| 451 | ), |
| 452 | array( |
| 453 | 'code' => 'IDR', |
| 454 | 'symbol' => 'Rp', |
| 455 | 'name' => 'Indonesian Rupiah', |
| 456 | 'locale' => 'id-id', |
| 457 | 'numeric_code' => 360, |
| 458 | ), |
| 459 | array( |
| 460 | 'code' => 'ILS', |
| 461 | 'symbol' => "₪", |
| 462 | 'name' => 'Israeli New Sheqel', |
| 463 | 'locale' => 'he-il', |
| 464 | 'numeric_code' => 376, |
| 465 | ), |
| 466 | array( |
| 467 | 'code' => 'INR', |
| 468 | 'symbol' => "₹", |
| 469 | 'name' => 'Indian Rupee', |
| 470 | 'locale' => 'hi-in', |
| 471 | 'numeric_code' => 356, |
| 472 | ), |
| 473 | array( |
| 474 | 'code' => 'IQD', |
| 475 | 'symbol' => 'IQD', |
| 476 | 'name' => 'Iraqi Dinar', |
| 477 | 'locale' => 'ar-iq', |
| 478 | 'numeric_code' => 368, |
| 479 | ), |
| 480 | array( |
| 481 | 'code' => 'IRR', |
| 482 | 'symbol' => 'IRR', |
| 483 | 'name' => 'Iranian Rial', |
| 484 | 'locale' => 'fa-ir', |
| 485 | 'numeric_code' => 364, |
| 486 | ), |
| 487 | array( |
| 488 | 'code' => 'ISK', |
| 489 | 'symbol' => 'kr', |
| 490 | 'name' => "Icelandic Kr\u00f3na", |
| 491 | 'locale' => 'en-is', |
| 492 | 'numeric_code' => 352, |
| 493 | ), |
| 494 | array( |
| 495 | 'code' => 'JMD', |
| 496 | 'symbol' => '$', |
| 497 | 'name' => 'Jamaican Dollar', |
| 498 | 'locale' => 'en-jm', |
| 499 | 'numeric_code' => 388, |
| 500 | ), |
| 501 | array( |
| 502 | 'code' => 'JOD', |
| 503 | 'symbol' => 'JOD', |
| 504 | 'name' => 'Jordanian Dinar', |
| 505 | 'locale' => 'ar-jo', |
| 506 | 'numeric_code' => 400, |
| 507 | ), |
| 508 | array( |
| 509 | 'code' => 'JPY', |
| 510 | 'symbol' => "¥", |
| 511 | 'name' => 'Japanese Yen', |
| 512 | 'locale' => 'ja-jp', |
| 513 | 'numeric_code' => 392, |
| 514 | ), |
| 515 | array( |
| 516 | 'code' => 'KES', |
| 517 | 'symbol' => 'KES', |
| 518 | 'name' => 'Kenyan Shilling', |
| 519 | 'locale' => 'en-ke', |
| 520 | 'numeric_code' => 404, |
| 521 | ), |
| 522 | array( |
| 523 | 'code' => 'KGS', |
| 524 | 'symbol' => 'KGS', |
| 525 | 'name' => 'Kyrgyzstani Som', |
| 526 | 'locale' => 'ky-kg', |
| 527 | 'numeric_code' => 417, |
| 528 | ), |
| 529 | array( |
| 530 | 'code' => 'KHR', |
| 531 | 'symbol' => "៛", |
| 532 | 'name' => 'Cambodian Riel', |
| 533 | 'locale' => 'km-kh', |
| 534 | 'numeric_code' => 116, |
| 535 | ), |
| 536 | array( |
| 537 | 'code' => 'KMF', |
| 538 | 'symbol' => 'KMF', |
| 539 | 'name' => 'Comorian Franc', |
| 540 | 'locale' => 'fr-km', |
| 541 | 'numeric_code' => 174, |
| 542 | ), |
| 543 | array( |
| 544 | 'code' => 'KPW', |
| 545 | 'symbol' => "₩", |
| 546 | 'name' => 'North Korean Won', |
| 547 | 'locale' => 'ko-kp', |
| 548 | 'numeric_code' => 408, |
| 549 | ), |
| 550 | array( |
| 551 | 'code' => 'KRW', |
| 552 | 'symbol' => "₩", |
| 553 | 'name' => 'South Korean Won', |
| 554 | 'locale' => 'ko-kr', |
| 555 | 'numeric_code' => 410, |
| 556 | ), |
| 557 | array( |
| 558 | 'code' => 'KWD', |
| 559 | 'symbol' => 'KWD', |
| 560 | 'name' => 'Kuwaiti Dinar', |
| 561 | 'locale' => 'ar-kw', |
| 562 | 'numeric_code' => 414, |
| 563 | ), |
| 564 | array( |
| 565 | 'code' => 'KYD', |
| 566 | 'symbol' => '$', |
| 567 | 'name' => 'Cayman Islands Dollar', |
| 568 | 'locale' => 'en-ky', |
| 569 | 'numeric_code' => 136, |
| 570 | ), |
| 571 | array( |
| 572 | 'code' => 'KZT', |
| 573 | 'symbol' => "₸", |
| 574 | 'name' => 'Kazakhstani Tenge', |
| 575 | 'locale' => 'kk-kz', |
| 576 | 'numeric_code' => 398, |
| 577 | ), |
| 578 | array( |
| 579 | 'code' => 'LAK', |
| 580 | 'symbol' => "₭", |
| 581 | 'name' => 'Lao Kip', |
| 582 | 'locale' => 'lo-la', |
| 583 | 'numeric_code' => 418, |
| 584 | ), |
| 585 | array( |
| 586 | 'code' => 'LBP', |
| 587 | 'symbol' => "L£", |
| 588 | 'name' => 'Lebanese Pound', |
| 589 | 'locale' => 'ar-lb', |
| 590 | 'numeric_code' => 422, |
| 591 | ), |
| 592 | array( |
| 593 | 'code' => 'LKR', |
| 594 | 'symbol' => 'Rs', |
| 595 | 'name' => 'Sri Lankan Rupee', |
| 596 | 'locale' => 'si-lk', |
| 597 | 'numeric_code' => 144, |
| 598 | ), |
| 599 | array( |
| 600 | 'code' => 'LRD', |
| 601 | 'symbol' => '$', |
| 602 | 'name' => 'Liberian Dollar', |
| 603 | 'locale' => 'en-lr', |
| 604 | 'numeric_code' => 430, |
| 605 | ), |
| 606 | array( |
| 607 | 'code' => 'LSL', |
| 608 | 'symbol' => 'LSL', |
| 609 | 'name' => 'Lesotho Loti', |
| 610 | 'locale' => 'en-ls', |
| 611 | 'numeric_code' => 426, |
| 612 | ), |
| 613 | array( |
| 614 | 'code' => 'LTL', |
| 615 | 'symbol' => 'Lt', |
| 616 | 'name' => 'Lithuanian Litas', |
| 617 | 'locale' => 'lt-lt', |
| 618 | 'numeric_code' => 440, |
| 619 | ), |
| 620 | array( |
| 621 | 'code' => 'LVL', |
| 622 | 'symbol' => 'LVL', |
| 623 | 'name' => 'Latvian Lats', |
| 624 | 'locale' => 'lv-lv', |
| 625 | 'numeric_code' => 428, |
| 626 | ), |
| 627 | array( |
| 628 | 'code' => 'LYD', |
| 629 | 'symbol' => 'LD', |
| 630 | 'name' => 'Libyan Dinar', |
| 631 | 'locale' => 'ar-ly', |
| 632 | 'numeric_code' => 434, |
| 633 | ), |
| 634 | array( |
| 635 | 'code' => 'MAD', |
| 636 | 'symbol' => 'MAD', |
| 637 | 'name' => 'Moroccan Dirham', |
| 638 | 'locale' => 'ar-ma', |
| 639 | 'numeric_code' => 504, |
| 640 | ), |
| 641 | array( |
| 642 | 'code' => 'MDL', |
| 643 | 'symbol' => 'MDL', |
| 644 | 'name' => 'Moldovan Leu', |
| 645 | 'locale' => 'ro-md', |
| 646 | 'numeric_code' => 498, |
| 647 | ), |
| 648 | array( |
| 649 | 'code' => 'MGA', |
| 650 | 'symbol' => 'Ar', |
| 651 | 'name' => 'Malagasy Ariary', |
| 652 | 'locale' => 'mg-mg', |
| 653 | 'numeric_code' => 969, |
| 654 | ), |
| 655 | array( |
| 656 | 'code' => 'MKD', |
| 657 | 'symbol' => 'MKD', |
| 658 | 'name' => 'Macedonian Denar', |
| 659 | 'locale' => 'mk-mk', |
| 660 | 'numeric_code' => 807, |
| 661 | ), |
| 662 | array( |
| 663 | 'code' => 'MMK', |
| 664 | 'symbol' => 'K', |
| 665 | 'name' => 'Myanma Kyat', |
| 666 | 'locale' => 'my-mm', |
| 667 | 'numeric_code' => 104, |
| 668 | ), |
| 669 | array( |
| 670 | 'code' => 'MNT', |
| 671 | 'symbol' => "₮", |
| 672 | 'name' => 'Mongolian Tugrik', |
| 673 | 'locale' => 'mn-mn', |
| 674 | 'numeric_code' => 496, |
| 675 | ), |
| 676 | array( |
| 677 | 'code' => 'MOP', |
| 678 | 'symbol' => 'MOP', |
| 679 | 'name' => 'Macanese Pataca', |
| 680 | 'locale' => 'pt-mo', |
| 681 | 'numeric_code' => 446, |
| 682 | ), |
| 683 | array( |
| 684 | 'code' => 'MRO', |
| 685 | 'symbol' => 'UM', |
| 686 | 'name' => 'Mauritanian Ouguiya', |
| 687 | 'locale' => 'ar-mr', |
| 688 | 'numeric_code' => 478, |
| 689 | ), |
| 690 | array( |
| 691 | 'code' => 'MUR', |
| 692 | 'symbol' => 'Rs', |
| 693 | 'name' => 'Mauritian Rupee', |
| 694 | 'locale' => 'en-mu', |
| 695 | 'numeric_code' => 480, |
| 696 | ), |
| 697 | array( |
| 698 | 'code' => 'MVR', |
| 699 | 'symbol' => 'Rf', |
| 700 | 'name' => 'Maldivian Rufiyaa', |
| 701 | 'locale' => 'dv-mv', |
| 702 | 'numeric_code' => 462, |
| 703 | ), |
| 704 | array( |
| 705 | 'code' => 'MWK', |
| 706 | 'symbol' => 'MWK', |
| 707 | 'name' => 'Malawian Kwacha', |
| 708 | 'locale' => 'en-mw', |
| 709 | 'numeric_code' => 454, |
| 710 | ), |
| 711 | array( |
| 712 | 'code' => 'MXN', |
| 713 | 'symbol' => '$', |
| 714 | 'name' => 'Mexican Peso', |
| 715 | 'locale' => 'es-mx', |
| 716 | 'numeric_code' => 484, |
| 717 | ), |
| 718 | array( |
| 719 | 'code' => 'MYR', |
| 720 | 'symbol' => 'RM', |
| 721 | 'name' => 'Malaysian Ringgit', |
| 722 | 'locale' => 'ms-my', |
| 723 | 'numeric_code' => 458, |
| 724 | ), |
| 725 | array( |
| 726 | 'code' => 'MZN', |
| 727 | 'symbol' => 'MZN', |
| 728 | 'name' => 'Mozambican Metical', |
| 729 | 'locale' => 'pt-mz', |
| 730 | 'numeric_code' => 943, |
| 731 | ), |
| 732 | array( |
| 733 | 'code' => 'NAD', |
| 734 | 'symbol' => '$', |
| 735 | 'name' => 'Namibian Dollar', |
| 736 | 'locale' => 'en-na', |
| 737 | 'numeric_code' => 516, |
| 738 | ), |
| 739 | array( |
| 740 | 'code' => 'NGN', |
| 741 | 'symbol' => "₦", |
| 742 | 'name' => 'Nigerian Naira', |
| 743 | 'locale' => 'en-ng', |
| 744 | 'numeric_code' => 566, |
| 745 | ), |
| 746 | array( |
| 747 | 'code' => 'NIO', |
| 748 | 'symbol' => '$', |
| 749 | 'name' => "Nicaraguan C\u00f3rdoba", |
| 750 | 'locale' => 'es-ni', |
| 751 | 'numeric_code' => 558, |
| 752 | ), |
| 753 | array( |
| 754 | 'code' => 'NOK', |
| 755 | 'symbol' => 'kr', |
| 756 | 'name' => 'Norwegian Krone', |
| 757 | 'locale' => 'nb-no', |
| 758 | 'numeric_code' => 578, |
| 759 | ), |
| 760 | array( |
| 761 | 'code' => 'NPR', |
| 762 | 'symbol' => "NPR", |
| 763 | 'name' => 'Nepalese Rupee', |
| 764 | 'locale' => 'ne-np', |
| 765 | 'numeric_code' => 524, |
| 766 | ), |
| 767 | array( |
| 768 | 'code' => 'NZD', |
| 769 | 'symbol' => '$', |
| 770 | 'name' => 'New Zealand Dollar', |
| 771 | 'locale' => 'en-nz', |
| 772 | 'numeric_code' => 554, |
| 773 | ), |
| 774 | array( |
| 775 | 'code' => 'OMR', |
| 776 | 'symbol' => 'OMR', |
| 777 | 'name' => 'Omani Rial', |
| 778 | 'locale' => 'ar-om', |
| 779 | 'numeric_code' => 512, |
| 780 | ), |
| 781 | array( |
| 782 | 'code' => 'PAB', |
| 783 | 'symbol' => 'PAB', |
| 784 | 'name' => 'Panamanian Balboa', |
| 785 | 'locale' => 'es-pa', |
| 786 | 'numeric_code' => 590, |
| 787 | ), |
| 788 | array( |
| 789 | 'code' => 'PEN', |
| 790 | 'symbol' => 'PEN', |
| 791 | 'name' => 'Peruvian Nuevo Sol', |
| 792 | 'locale' => 'es-pe', |
| 793 | 'numeric_code' => 604, |
| 794 | ), |
| 795 | array( |
| 796 | 'code' => 'PGK', |
| 797 | 'symbol' => 'K', |
| 798 | 'name' => 'Papua New Guinean Kina', |
| 799 | 'locale' => 'en-pg', |
| 800 | 'numeric_code' => 598, |
| 801 | ), |
| 802 | array( |
| 803 | 'code' => 'PHP', |
| 804 | 'symbol' => "₱", |
| 805 | 'name' => 'Philippine Peso', |
| 806 | 'locale' => 'en-ph', |
| 807 | 'numeric_code' => 608, |
| 808 | ), |
| 809 | array( |
| 810 | 'code' => 'PKR', |
| 811 | 'symbol' => 'Rs', |
| 812 | 'name' => 'Pakistani Rupee', |
| 813 | 'locale' => 'en-pk', |
| 814 | 'numeric_code' => 586, |
| 815 | ), |
| 816 | array( |
| 817 | 'code' => 'PLN', |
| 818 | 'symbol' => "zł", |
| 819 | 'name' => 'Polish Zloty', |
| 820 | 'locale' => 'pl-pl', |
| 821 | 'numeric_code' => 985, |
| 822 | ), |
| 823 | array( |
| 824 | 'code' => 'PYG', |
| 825 | 'symbol' => "₲", |
| 826 | 'name' => 'Paraguayan Guarani', |
| 827 | 'locale' => 'es-py', |
| 828 | 'numeric_code' => 600, |
| 829 | ), |
| 830 | array( |
| 831 | 'code' => 'QAR', |
| 832 | 'symbol' => 'QAR', |
| 833 | 'name' => 'Qatari Riyal', |
| 834 | 'locale' => 'ar-qa', |
| 835 | 'numeric_code' => 634, |
| 836 | ), |
| 837 | array( |
| 838 | 'code' => 'RON', |
| 839 | 'symbol' => 'RON', |
| 840 | 'name' => 'Romanian Leu', |
| 841 | 'locale' => 'ro-ro', |
| 842 | 'numeric_code' => 946, |
| 843 | ), |
| 844 | array( |
| 845 | 'code' => 'RSD', |
| 846 | 'symbol' => 'RSD', |
| 847 | 'name' => 'Serbian Dinar', |
| 848 | 'locale' => 'sr-rs', |
| 849 | 'numeric_code' => 941, |
| 850 | ), |
| 851 | array( |
| 852 | 'code' => 'RUB', |
| 853 | 'symbol' => "₽", |
| 854 | 'name' => 'Russian Ruble', |
| 855 | 'locale' => 'ru-ru', |
| 856 | 'numeric_code' => 643, |
| 857 | ), |
| 858 | array( |
| 859 | 'code' => 'SAR', |
| 860 | 'symbol' => 'SAR', |
| 861 | 'name' => 'Saudi Riyal', |
| 862 | 'locale' => 'ar-sa', |
| 863 | 'numeric_code' => 682, |
| 864 | ), |
| 865 | array( |
| 866 | 'code' => 'SBD', |
| 867 | 'symbol' => '$', |
| 868 | 'name' => 'Solomon Islands Dollar', |
| 869 | 'locale' => 'en-sb', |
| 870 | 'numeric_code' => 90, |
| 871 | ), |
| 872 | array( |
| 873 | 'code' => 'SCR', |
| 874 | 'symbol' => 'Rs', |
| 875 | 'name' => 'Seychellois Rupee', |
| 876 | 'locale' => 'en-sc', |
| 877 | 'numeric_code' => 690, |
| 878 | ), |
| 879 | array( |
| 880 | 'code' => 'SDG', |
| 881 | 'symbol' => 'SDG', |
| 882 | 'name' => 'Sudanese Pound', |
| 883 | 'locale' => 'ar-sd', |
| 884 | 'numeric_code' => 938, |
| 885 | ), |
| 886 | array( |
| 887 | 'code' => 'SEK', |
| 888 | 'symbol' => 'kr', |
| 889 | 'name' => 'Swedish Krona', |
| 890 | 'locale' => 'sv-se', |
| 891 | 'numeric_code' => 752, |
| 892 | ), |
| 893 | array( |
| 894 | 'code' => 'SGD', |
| 895 | 'symbol' => '$', |
| 896 | 'name' => 'Singapore Dollar', |
| 897 | 'locale' => 'en-sg', |
| 898 | 'numeric_code' => 702, |
| 899 | ), |
| 900 | array( |
| 901 | 'code' => 'SHP', |
| 902 | 'symbol' => "£", |
| 903 | 'name' => 'Saint Helena Pound', |
| 904 | 'locale' => 'en-sh', |
| 905 | 'numeric_code' => 654, |
| 906 | ), |
| 907 | array( |
| 908 | 'code' => 'SLL', |
| 909 | 'symbol' => 'SLL', |
| 910 | 'name' => 'Sierra Leonean Leone', |
| 911 | 'locale' => 'en-sl', |
| 912 | 'numeric_code' => 694, |
| 913 | ), |
| 914 | array( |
| 915 | 'code' => 'SOS', |
| 916 | 'symbol' => 'SOS', |
| 917 | 'name' => 'Somali Shilling', |
| 918 | 'locale' => 'so-so', |
| 919 | 'numeric_code' => 706, |
| 920 | ), |
| 921 | array( |
| 922 | 'code' => 'SRD', |
| 923 | 'symbol' => '$', |
| 924 | 'name' => 'Surinamese Dollar', |
| 925 | 'locale' => 'nl-sr', |
| 926 | 'numeric_code' => 968, |
| 927 | ), |
| 928 | array( |
| 929 | 'code' => 'SYP', |
| 930 | 'symbol' => "£", |
| 931 | 'name' => 'Syrian Pound', |
| 932 | 'locale' => 'ar-sy', |
| 933 | 'numeric_code' => 760, |
| 934 | ), |
| 935 | array( |
| 936 | 'code' => 'SZL', |
| 937 | 'symbol' => 'SZL', |
| 938 | 'name' => 'Swazi Lilangeni', |
| 939 | 'locale' => 'en-sz', |
| 940 | 'numeric_code' => 748, |
| 941 | ), |
| 942 | array( |
| 943 | 'code' => 'THB', |
| 944 | 'symbol' => "฿", |
| 945 | 'name' => 'Thai Baht', |
| 946 | 'locale' => 'th-th', |
| 947 | 'numeric_code' => 764, |
| 948 | ), |
| 949 | array( |
| 950 | 'code' => 'TJS', |
| 951 | 'symbol' => 'TJS', |
| 952 | 'name' => 'Tajikistani Somoni', |
| 953 | 'locale' => 'tg-tj', |
| 954 | 'numeric_code' => 972, |
| 955 | ), |
| 956 | array( |
| 957 | 'code' => 'TMT', |
| 958 | 'symbol' => 'm', |
| 959 | 'name' => 'Turkmen Manat', |
| 960 | 'locale' => 'tk-tm', |
| 961 | 'numeric_code' => 934, |
| 962 | ), |
| 963 | array( |
| 964 | 'code' => 'TND', |
| 965 | 'symbol' => 'TND', |
| 966 | 'name' => 'Tunisian Dinar', |
| 967 | 'locale' => 'ar-tn', |
| 968 | 'numeric_code' => 788, |
| 969 | ), |
| 970 | array( |
| 971 | 'code' => 'TRY', |
| 972 | 'symbol' => 'TRY', |
| 973 | 'name' => 'Turkish New Lira', |
| 974 | 'locale' => 'tr-tr', |
| 975 | 'numeric_code' => 949, |
| 976 | ), |
| 977 | array( |
| 978 | 'code' => 'TTD', |
| 979 | 'symbol' => '$', |
| 980 | 'name' => 'Trinidad and Tobago Dollar', |
| 981 | 'locale' => 'en-tt', |
| 982 | 'numeric_code' => 780, |
| 983 | ), |
| 984 | array( |
| 985 | 'code' => 'TWD', |
| 986 | 'symbol' => '$', |
| 987 | 'name' => 'New Taiwan Dollar', |
| 988 | 'locale' => 'zh-tw', |
| 989 | 'numeric_code' => 901, |
| 990 | ), |
| 991 | array( |
| 992 | 'code' => 'TZS', |
| 993 | 'symbol' => 'TZS', |
| 994 | 'name' => 'Tanzanian Shilling', |
| 995 | 'locale' => 'en-tz', |
| 996 | 'numeric_code' => 834, |
| 997 | ), |
| 998 | array( |
| 999 | 'code' => 'UAH', |
| 1000 | 'symbol' => 'UAH', |
| 1001 | 'name' => 'Ukrainian Hryvnia', |
| 1002 | 'locale' => 'uk-ua', |
| 1003 | 'numeric_code' => 980, |
| 1004 | ), |
| 1005 | array( |
| 1006 | 'code' => 'UGX', |
| 1007 | 'symbol' => 'UGX', |
| 1008 | 'name' => 'Ugandan shilling', |
| 1009 | 'locale' => 'en-ug', |
| 1010 | 'numeric_code' => 800, |
| 1011 | ), |
| 1012 | array( |
| 1013 | 'code' => 'UYU', |
| 1014 | 'symbol' => '$', |
| 1015 | 'name' => 'Uruguayan Peso', |
| 1016 | 'locale' => 'es-uy', |
| 1017 | 'numeric_code' => 858, |
| 1018 | ), |
| 1019 | array( |
| 1020 | 'code' => 'UZS', |
| 1021 | 'symbol' => 'UZS', |
| 1022 | 'name' => 'Uzbekistani Som', |
| 1023 | 'locale' => 'uz-UZ', |
| 1024 | 'numeric_code' => 860, |
| 1025 | ), |
| 1026 | array( |
| 1027 | 'code' => 'VES', |
| 1028 | 'symbol' => 'VES', |
| 1029 | 'name' => 'Venezuelan Bolivar', |
| 1030 | 'locale' => 'es-VE', |
| 1031 | 'numeric_code' => 928, |
| 1032 | ), |
| 1033 | array( |
| 1034 | 'code' => 'VND', |
| 1035 | 'symbol' => "₫", |
| 1036 | 'name' => 'Vietnamese Dong', |
| 1037 | 'locale' => 'vi-VN', |
| 1038 | 'numeric_code' => 704, |
| 1039 | ), |
| 1040 | array( |
| 1041 | 'code' => 'VUV', |
| 1042 | 'symbol' => 'VT', |
| 1043 | 'name' => 'Vanuatu Vatu', |
| 1044 | 'locale' => 'bi-VU', |
| 1045 | 'numeric_code' => 548, |
| 1046 | ), |
| 1047 | array( |
| 1048 | 'code' => 'WST', |
| 1049 | 'symbol' => '$', |
| 1050 | 'name' => 'Samoan Tala', |
| 1051 | 'locale' => 'sm-WS', |
| 1052 | 'numeric_code' => 882, |
| 1053 | ), |
| 1054 | array( |
| 1055 | 'code' => 'XCD', |
| 1056 | 'symbol' => '$', |
| 1057 | 'name' => 'East Caribbean Dollar', |
| 1058 | 'locale' => 'en-XC', |
| 1059 | 'numeric_code' => 951, |
| 1060 | ), |
| 1061 | array( |
| 1062 | 'code' => 'XDR', |
| 1063 | 'symbol' => 'SDR', |
| 1064 | 'name' => 'Special Drawing Rights', |
| 1065 | 'locale' => 'xdr-XD', |
| 1066 | 'numeric_code' => 960, |
| 1067 | ), |
| 1068 | array( |
| 1069 | 'code' => 'XOF', |
| 1070 | 'symbol' => 'CFA', |
| 1071 | 'name' => 'West African CFA franc', |
| 1072 | 'locale' => 'fr-XO', |
| 1073 | 'numeric_code' => 952, |
| 1074 | ), |
| 1075 | array( |
| 1076 | 'code' => 'XPF', |
| 1077 | 'symbol' => 'F', |
| 1078 | 'name' => 'CFP Franc', |
| 1079 | 'locale' => 'fr-PF', |
| 1080 | 'numeric_code' => 953, |
| 1081 | ), |
| 1082 | array( |
| 1083 | 'code' => 'YER', |
| 1084 | 'symbol' => 'YER', |
| 1085 | 'name' => 'Yemeni Rial', |
| 1086 | 'locale' => 'ar-YE', |
| 1087 | 'numeric_code' => 886, |
| 1088 | ), |
| 1089 | array( |
| 1090 | 'code' => 'ZAR', |
| 1091 | 'symbol' => 'R', |
| 1092 | 'name' => 'South African Rand', |
| 1093 | 'locale' => 'en-ZA', |
| 1094 | 'numeric_code' => 710, |
| 1095 | ), |
| 1096 | array( |
| 1097 | 'code' => 'ZMK', |
| 1098 | 'symbol' => 'ZK', |
| 1099 | 'name' => 'Zambian Kwacha', |
| 1100 | 'locale' => 'en-ZM', |
| 1101 | 'numeric_code' => 894, |
| 1102 | ), |
| 1103 | array( |
| 1104 | 'code' => 'ZWR', |
| 1105 | 'symbol' => '$', |
| 1106 | 'name' => 'Zimbabwean Dollar', |
| 1107 | 'locale' => 'en-ZW', |
| 1108 | 'numeric_code' => 935, |
| 1109 | ), |
| 1110 | ); |
| 1111 | |
| 1112 | return $currencies; |
| 1113 | } |
| 1114 | } |
| 1115 | |
| 1116 | if ( ! function_exists( 'tutor_get_currencies_info_code' ) ) { |
| 1117 | /** |
| 1118 | * Get tutor currencies |
| 1119 | * |
| 1120 | * @since 3.0.0 |
| 1121 | * |
| 1122 | * @param string $code Currency code. |
| 1123 | * |
| 1124 | * @return array |
| 1125 | */ |
| 1126 | function tutor_get_currencies_info_by_code( $code ) { |
| 1127 | $currencies = get_tutor_currencies(); |
| 1128 | $found = null; |
| 1129 | |
| 1130 | foreach ( $currencies as $currency ) { |
| 1131 | $flip = array_flip( $currency ); |
| 1132 | if ( isset( $flip[ $code ] ) ) { |
| 1133 | $found = $currency; |
| 1134 | break; |
| 1135 | } |
| 1136 | } |
| 1137 | return $found; |
| 1138 | } |
| 1139 | } |
| 1140 | |
| 1141 | if ( ! function_exists( 'get_currency_symbol_by_code' ) ) { |
| 1142 | /** |
| 1143 | * Get currency options where key is symbol |
| 1144 | * and code is value |
| 1145 | * |
| 1146 | * It will return $ as default |
| 1147 | * |
| 1148 | * @since 3.0.0 |
| 1149 | * |
| 1150 | * @param mixed $code Currency code. |
| 1151 | * |
| 1152 | * @return string |
| 1153 | */ |
| 1154 | function tutor_get_currency_symbol_by_code( $code ) { |
| 1155 | $currencies = get_tutor_currencies(); |
| 1156 | $search = array_search( $code, array_column( $currencies, 'code' ) ); |
| 1157 | |
| 1158 | if ( false !== $search ) { |
| 1159 | return $currencies[ $search ]['symbol']; |
| 1160 | } else { |
| 1161 | return '$'; |
| 1162 | } |
| 1163 | } |
| 1164 | } |
| 1165 | |
| 1166 | |
| 1167 | |
| 1168 |