public function can_migrate_from_version($version_array) { $core_version_string = $version_array['Core']; $calendar_version_string = isset($version_array['Calendar']) ? $version_array['Calendar'] : '0.0.0'; //find if the ee3 table for calendar data exists or not if (!EEH_Activation::table_exists("events_category_detail")) { //ee3 category tables don't exist still $an_ee3_table_exists = false; } else { $an_ee3_table_exists = true; } if (get_option('ee_data_migration_script_Core.4.1.0')) { $core_4_1_0_migrations_ran = true; } else { $core_4_1_0_migrations_ran = false; } if ($core_version_string >= '4.1.0' && $calendar_version_string < '3.0.0' && $an_ee3_table_exists && $core_4_1_0_migrations_ran) { return true; } else { //migration doesnt' apply. //eg they installed ee4.1.0 and then activated calendar, but no previous version of ee3 //or they installed ee3, then ee4.1, but deleted their ee3 tables, then activated teh calendar return false; } }
/** * OK's the creation of the esp_new_addon table, because this hooks in AFTER EE_UNitTestCase's callback on this same hook * @global type $wpdb * @param array $whitelisted_tables * @return array */ public function dont_short_circuit_new_addon_table($short_circuit = FALSE, $table_name = '', $create_sql = '') { if (in_array($table_name, array('esp_new_addon_thing', 'esp_new_addon_attendee_meta')) && !EEH_Activation::table_exists($table_name)) { // echo "\r\n\r\nDONT shortcircuit $sql"; //it's not altering. it's ok to allow this return FALSE; } else { // echo "3\r\n\r\nshort circuit:$sql"; return $short_circuit; } }
/** * @param array $version_array * @return bool */ public function can_migrate_from_version($version_array) { $version_string = $version_array['Core']; if ($version_string <= '4.7.0' && $version_string >= '4.6.0' || $version_string >= '4.7.0' && !EEH_Activation::table_exists('esp_registration_payment') && EEH_Activation::table_exists('esp_registration')) { return true; } elseif (!$version_string) { //no version string provided... this must be pre 4.3 return false; //changed mind. dont want people thinking they should migrate yet because they cant } else { return false; } }
/** * Checks that there is at least one active gateway. If not, add a notice */ public function check_payment_gateway_setup() { //ONLY do this check if models can query //and avoid a bug where when we nuke EE4's data that this causes a fatal error //because the tables are deleted just before this request runs. see https://events.codebasehq.com/projects/event-espresso/tickets/7539 if (!EE_Maintenance_Mode::instance()->models_can_query() || !EEH_Activation::table_exists(EEM_Payment_Method::instance()->table())) { return; } // ensure Payment_Method model is loaded EE_Registry::instance()->load_model('Payment_Method'); $actives = EEM_Payment_Method::instance()->count_active(EEM_Payment_Method::scope_cart); if ($actives < 1) { $url = EE_Admin_Page::add_query_args_and_nonce(array(), EE_PAYMENTS_ADMIN_URL); echo '<div class="error"> <p>' . sprintf(__("There are no Active Payment Methods setup for Event Espresso. Please %s activate at least one.%s", "event_espresso"), "<a href='{$url}'>", "</a>") . '</p> </div>'; } }
/** * Upon brand-new activation, if this is a new activation of CAF, we want to add * some global prices that will show off EE4's capabilities. However, if they're upgrading * from 3.1, or simply EE4.x decaf, we assume they don't want us to suddenly introduce these extra prices. * This action should only be called when EE 4.x.0.P is initially activated. * Right now the only CAF content are these global prices. If there's more in the future, then * we should probably create a caf file to contain it all instead just a function like this. * Right now, we ASSUME the only price types in the system are default ones * @global type $wpdb */ function initialize_caf_db_content() { // echo "initialize caf db content!"; global $wpdb; //use same method of getting creator id as the version introducing the change $default_creator_id = apply_filters('FHEE__EE_DMS_Core_4_5_0__get_default_creator_id', get_current_user_id()); $price_type_table = $wpdb->prefix . "esp_price_type"; $price_table = $wpdb->prefix . "esp_price"; if (EEH_Activation::table_exists($price_type_table)) { $SQL = 'SELECT COUNT(PRT_ID) FROM ' . $price_type_table . ' WHERE PBT_ID=4'; //include trashed price types $tax_price_type_count = $wpdb->get_var($SQL); if ($tax_price_type_count <= 1) { $result = $wpdb->insert($price_type_table, array('PRT_name' => __("Regional Tax", "event_espresso"), 'PBT_ID' => 4, 'PRT_is_percent' => true, 'PRT_order' => 60, 'PRT_deleted' => false, 'PRT_wp_user' => $default_creator_id), array('%s', '%d', '%d', '%d', '%d', '%d')); //federal tax $result = $wpdb->insert($price_type_table, array('PRT_name' => __("Federal Tax", "event_espresso"), 'PBT_ID' => 4, 'PRT_is_percent' => true, 'PRT_order' => 70, 'PRT_deleted' => false, 'PRT_wp_user' => $default_creator_id), array('%s', '%d', '%d', '%d', '%d', '%d')); if ($result) { $wpdb->insert($price_table, array('PRT_ID' => $wpdb->insert_id, 'PRC_amount' => 15.0, 'PRC_name' => __("Sales Tax", "event_espresso"), 'PRC_desc' => '', 'PRC_is_default' => true, 'PRC_overrides' => NULL, 'PRC_deleted' => false, 'PRC_order' => 50, 'PRC_parent' => null, 'PRC_wp_user' => $default_creator_id), array('%d', '%f', '%s', '%s', '%d', '%d', '%d', '%d', '%d', '%d')); } } } }
/** * insert_default_status_codes * * @access public * @static * @return void */ public static function insert_default_status_codes() { global $wpdb; if (EEH_Activation::table_exists(EEM_Status::instance()->table())) { $table_name = EEM_Status::instance()->table(); $SQL = "DELETE FROM {$table_name} WHERE STS_ID IN ( 'ACT', 'NAC', 'NOP', 'OPN', 'CLS', 'PND', 'ONG', 'SEC', 'DRF', 'DEL', 'DEN', 'EXP', 'RPP', 'RCN', 'RDC', 'RAP', 'RNA', 'TAB', 'TIN', 'TFL', 'TCM', 'TOP', 'PAP', 'PCN', 'PFL', 'PDC', 'EDR', 'ESN', 'PPN', 'RIC' );"; $wpdb->query($SQL); $SQL = "INSERT INTO {$table_name}\n\t\t\t\t\t(STS_ID, STS_code, STS_type, STS_can_edit, STS_desc, STS_open) VALUES\n\t\t\t\t\t('ACT', 'ACTIVE', 'event', 0, NULL, 1),\n\t\t\t\t\t('NAC', 'NOT_ACTIVE', 'event', 0, NULL, 0),\n\t\t\t\t\t('NOP', 'REGISTRATION_NOT_OPEN', 'event', 0, NULL, 1),\n\t\t\t\t\t('OPN', 'REGISTRATION_OPEN', 'event', 0, NULL, 1),\n\t\t\t\t\t('CLS', 'REGISTRATION_CLOSED', 'event', 0, NULL, 0),\n\t\t\t\t\t('PND', 'PENDING', 'event', 0, NULL, 1),\n\t\t\t\t\t('ONG', 'ONGOING', 'event', 0, NULL, 1),\n\t\t\t\t\t('SEC', 'SECONDARY', 'event', 0, NULL, 1),\n\t\t\t\t\t('DRF', 'DRAFT', 'event', 0, NULL, 0),\n\t\t\t\t\t('DEL', 'DELETED', 'event', 0, NULL, 0),\n\t\t\t\t\t('DEN', 'DENIED', 'event', 0, NULL, 0),\n\t\t\t\t\t('EXP', 'EXPIRED', 'event', 0, NULL, 0),\n\t\t\t\t\t('RPP', 'PENDING_PAYMENT', 'registration', 0, NULL, 1),\n\t\t\t\t\t('RAP', 'APPROVED', 'registration', 0, NULL, 1),\n\t\t\t\t\t('RCN', 'CANCELLED', 'registration', 0, NULL, 0),\n\t\t\t\t\t('RDC', 'DECLINED', 'registration', 0, NULL, 0),\n\t\t\t\t\t('RNA', 'NOT_APPROVED', 'registration', 0, NULL, 1),\n\t\t\t\t\t('RIC', 'INCOMPLETE', 'registration', 0, NULL, 1),\n\t\t\t\t\t('TFL', 'FAILED', 'transaction', 0, NULL, 0),\n\t\t\t\t\t('TAB', 'ABANDONED', 'transaction', 0, NULL, 0),\n\t\t\t\t\t('TIN', 'INCOMPLETE', 'transaction', 0, NULL, 1),\n\t\t\t\t\t('TCM', 'COMPLETE', 'transaction', 0, NULL, 1),\n\t\t\t\t\t('TOP',\t'OVERPAID', 'transaction', 0, NULL, 1),\n\t\t\t\t\t('PAP', 'APPROVED', 'payment', 0, NULL, 1),\n\t\t\t\t\t('PPN', 'PENDING', 'payment', 0, NULL, 1),\n\t\t\t\t\t('PCN', 'CANCELLED', 'payment', 0, NULL, 0),\n\t\t\t\t\t('PFL', 'FAILED', 'payment', 0, NULL, 0),\n\t\t\t\t\t('PDC', 'DECLINED', 'payment', 0, NULL, 0),\n\t\t\t\t\t('EDR', 'DRAFT', 'email', 0, NULL, 0),\n\t\t\t\t\t('ESN', 'SENT', 'email', 0, NULL, 1);"; $wpdb->query($SQL); } }
/** * Asserts the table (even temporary one) does not exist * We really should implement this function in the proper PHPunit style * @see http://php-and-symfony.matthiasnoback.nl/2012/02/phpunit-writing-a-custom-assertion/ * @global WPDB $wpdb * @param string $table_name with or without $wpdb->prefix * @param string $model_name the model's name (only used for error reporting) */ function assertTableDoesNotExist($table_name, $model_name = 'Unknown') { if (EEH_Activation::table_exists($table_name)) { $this->fail(sprintf(__('Table like %1$s SHOULD NOT exist. It was apparently defined on the model "%2$s"', 'event_espresso'), $table_name, $model_name)); } }
/** * get list of registration statuses * @access private * @param array $exclude * @return array */ private function _get_registration_status_array($exclude = array()) { //in the very rare circumstance that we are deleting a model's table's data //and the table hasn't actually been created, this could have an error /** @type WPDB $wpdb */ global $wpdb; EE_Registry::instance()->load_helper('Activation'); if (EEH_Activation::table_exists($wpdb->prefix . 'esp_status')) { $SQL = 'SELECT STS_ID, STS_code FROM ' . $wpdb->prefix . 'esp_status WHERE STS_type = "registration"'; $results = $wpdb->get_results($SQL); self::$_reg_status = array(); foreach ($results as $status) { if (!in_array($status->STS_ID, $exclude)) { self::$_reg_status[$status->STS_ID] = $status->STS_code; } } } }
/** * _old_table_exists * returns TRUE if the requested table exists in the current database * @param string $table_name * @return boolean */ protected function _old_table_exists($table_name) { EE_Registry::instance()->load_helper('Activation'); return EEH_Activation::table_exists($table_name); }
/** * insert DEFAULT ticket * Almost identical to EE_DMS_Core_4_1_0::insert_default_tickets, except is aware of the TKT_required field * * @access public * @static * @return void */ public function insert_default_tickets() { global $wpdb; $ticket_table = $wpdb->prefix . "esp_ticket"; if (EEH_Activation::table_exists($ticket_table)) { $SQL = 'SELECT COUNT(TKT_ID) FROM ' . $ticket_table; $tickets_exist = $wpdb->get_var($SQL); if (!$tickets_exist) { $SQL = "INSERT INTO {$ticket_table}\n\t\t\t\t\t( TKT_ID, TTM_ID, TKT_name, TKT_description, TKT_qty, TKT_sold, TKT_uses, TKT_required, TKT_min, TKT_max, TKT_price, TKT_start_date, TKT_end_date, TKT_taxable, TKT_order, TKT_row, TKT_is_default, TKT_parent, TKT_deleted ) VALUES\n\t\t\t\t\t( 1, 0, '" . __("Free Ticket", "event_espresso") . "', '', 100, 0, -1, 0, 0, -1, 0.00, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 0, 0, 1, 1, 0, 0);"; $SQL = apply_filters('FHEE__EE_DMS_4_1_0__insert_default_tickets__SQL', $SQL); $wpdb->query($SQL); } } $ticket_price_table = $wpdb->prefix . "esp_ticket_price"; if (EEH_Activation::table_exists($ticket_price_table)) { $SQL = 'SELECT COUNT(TKP_ID) FROM ' . $ticket_price_table; $ticket_prc_exist = $wpdb->get_var($SQL); if (!$ticket_prc_exist) { $SQL = "INSERT INTO {$ticket_price_table}\n\t\t\t\t( TKP_ID, TKT_ID, PRC_ID ) VALUES\n\t\t\t\t( 1, 1, 1 )\n\t\t\t\t"; $SQL = apply_filters('FHEE__EE_DMS_4_1_0__insert_default_tickets__SQL__ticket_price', $SQL); $wpdb->query($SQL); } } }
/** * class constructor * * @access public * @param string $CNT_ISO * @return \EE_Currency_Config */ public function __construct($CNT_ISO = '') { // get country code from organization settings or use default $ORG_CNT = isset(EE_Registry::instance()->CFG->organization) && EE_Registry::instance()->CFG->organization instanceof EE_Organization_Config ? EE_Registry::instance()->CFG->organization->CNT_ISO : ''; // but override if requested $CNT_ISO = !empty($CNT_ISO) ? $CNT_ISO : $ORG_CNT; // so if that all went well, and we are not in M-Mode (cuz you can't query the db in M-Mode) and double-check the countries table exists if (!empty($CNT_ISO) && EE_Maintenance_Mode::instance()->models_can_query() && EEH_Activation::table_exists(EE_Registry::instance()->load_model('Country')->table())) { // retrieve the country settings from the db, just in case they have been customized $country = EE_Registry::instance()->load_model('Country')->get_one_by_ID($CNT_ISO); if ($country instanceof EE_Country) { $this->code = $country->currency_code(); // currency code: USD, CAD, EUR $this->name = $country->currency_name_single(); // Dollar $this->plural = $country->currency_name_plural(); // Dollars $this->sign = $country->currency_sign(); // currency sign: $ $this->sign_b4 = $country->currency_sign_before(); // currency sign before or after: $TRUE or FALSE$ $this->dec_plc = $country->currency_decimal_places(); // decimal places: 2 = 0.00 3 = 0.000 $this->dec_mrk = $country->currency_decimal_mark(); // decimal mark: (comma) ',' = 0,01 or (decimal) '.' = 0.01 $this->thsnds = $country->currency_thousands_separator(); // thousands separator: (comma) ',' = 1,000 or (decimal) '.' = 1.000 } } // fallback to hardcoded defaults, in case the above failed if (empty($this->code)) { // set default currency settings $this->code = 'USD'; // currency code: USD, CAD, EUR $this->name = __('Dollar', 'event_espresso'); // Dollar $this->plural = __('Dollars', 'event_espresso'); // Dollars $this->sign = '$'; // currency sign: $ $this->sign_b4 = true; // currency sign before or after: $TRUE or FALSE$ $this->dec_plc = 2; // decimal places: 2 = 0.00 3 = 0.000 $this->dec_mrk = '.'; // decimal mark: (comma) ',' = 0,01 or (decimal) '.' = 0.01 $this->thsnds = ','; // thousands separator: (comma) ',' = 1,000 or (decimal) '.' = 1.000 } }
/** * verifies each of the new currencies exists that somehow we missed in 4.6 */ public function verify_new_currencies() { //a list of countries (and specifically some which were missed in another list):https://gist.github.com/adhipg/1600028 //how many decimal places? https://en.wikipedia.org/wiki/ISO_4217 //currency symbols: http://www.xe.com/symbols.php // CUR_code, CUR_single, CUR_plural, CUR_sign, CUR_dec_plc, CUR_active //( 'EUR', 'Euro', 'Euros', '€', 2,1), $newer_currencies = array(array('RSD', 'Dinar', 'Dinars', '', 3, 1)); global $wpdb; $currency_table = $wpdb->prefix . "esp_currency"; $currency_format = array("CUR_code" => '%s', "CUR_single" => '%s', "CUR_plural" => '%s', "CUR_sign" => '%s', "CUR_dec_plc" => '%d', "CUR_active" => '%d'); if (EEH_Activation::table_exists($currency_table)) { foreach ($newer_currencies as $currency) { $SQL = "SELECT COUNT('CUR_code') FROM {$currency_table} WHERE CUR_code='{$currency[0]}' LIMIT 1"; $countries = $wpdb->get_var($SQL); if (!$countries) { $wpdb->insert($currency_table, array_combine(array_keys($currency_format), $currency), $currency_format); } } } }
/** * _old_table_exists * returns TRUE if the requested table exists in the current database * @param string $table_name * @return boolean */ protected function _old_table_exists($table_name) { return EEH_Activation::table_exists($table_name); }
/** * insert_default_countries * * @static * @return void */ public function insert_default_currencies() { global $wpdb; $currency_table = $wpdb->prefix . "esp_currency"; if (EEH_Activation::table_exists($currency_table)) { $SQL = "SELECT COUNT('CUR_code') FROM {$currency_table}"; $countries = $wpdb->get_var($SQL); if (!$countries) { $SQL = "INSERT INTO {$currency_table}\n\t\t\t\t( CUR_code, CUR_single, CUR_plural, CUR_sign, CUR_dec_plc, CUR_active) VALUES\n\t\t\t\t( 'EUR', 'Euro', 'Euros', '€', 2,1),\n\t\t\t\t( 'AED', 'Dirham', 'Dirhams', 'د.إ',2,1),\n\t\t\t\t( 'AFN', 'Afghani', 'Afghanis', '؋', 2, 1),\n\t\t\t\t( 'XCD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'ALL', 'Lek', 'Leks', 'Lek', 2,1),\n\t\t\t\t( 'AMD', 'Dram', 'Dram', 'Դրամ', 2,1),\n\t\t\t\t( 'ANG', 'Guilder', 'Guilders', 'ƒ', 2,1),\n\t\t\t\t( 'AOA', 'Kwanza', 'Kwanzas', '', 2,1),\n\t\t\t\t( 'ARS', 'Peso', 'Pesos', '\$', 2,1),\n\t\t\t\t( 'USD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'AUD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'AWG', 'Guilder', 'Guilders', 'ƒ', 2,1),\n\t\t\t\t( 'BAM', 'Marka', 'Markas', 'KM', 2,1),\n\t\t\t\t( 'BBD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'BDT', 'Taka', 'Takas', '৳', 2,1),\n\t\t\t\t( 'XOF', 'Franc', 'Francs', '₣', 0,1),\n\t\t\t\t( 'BGN', 'Lev', 'Levs', 'лв', 2,1),\n\t\t\t\t( 'BHD', 'Dinar', 'Dinars', '', 3,1),\n\t\t\t\t( 'BIF', 'Franc', 'Francs', '₣', 0,1),\n\t\t\t\t( 'BMD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'BND', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'BOB', 'Boliviano', 'Bolivianos', '\$b', 2,1),\n\t\t\t\t( 'BRL', 'Real', 'Reals', 'R\$', 2,1),\n\t\t\t\t( 'BSD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'BTN', 'Ngultrum', 'Ngultrums', '', 2,1),\n\t\t\t\t( 'BWP', 'Pula', 'Pulas', 'P', 2,1),\n\t\t\t\t( 'BYR', 'Ruble', 'Rubles', 'p.', 0,1),\n\t\t\t\t( 'BZD', 'Dollar', 'Dollars', 'BZ\$', 2,1),\n\t\t\t\t( 'CAD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'CDF', 'Franc', 'Francs', '₣', 2,1),\n\t\t\t\t( 'XAF', 'Franc', 'Francs', '₣', 0,1),\n\t\t\t\t( 'CHF', 'Franc', 'Francs', '₣', 2,1),\n\t\t\t\t( 'NZD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'CLP', 'Peso', 'Pesos', '\$', 0,1),\n\t\t\t\t( 'CNY', 'Yuan Renminbi', 'Yuan Renminbis', '¥', 2,1),\n\t\t\t\t( 'COP', 'Peso', 'Pesos', '\$', 2,1),\n\t\t\t\t( 'CRC', 'Colon', 'Colons', '₡', 2,1),\n\t\t\t\t( 'CUP', 'Peso', 'Pesos', '₱', 2,1),\n\t\t\t\t( 'CVE', 'Escudo', 'Escudos', '', 2,1),\n\t\t\t\t( 'CZK', 'Koruna', 'Korunas', 'Kč', 2,1),\n\t\t\t\t( 'DJF', 'Franc', 'Francs', '₣', 0,1),\n\t\t\t\t( 'DKK', 'Krone', 'Kroner', 'kr', 2,1),\n\t\t\t\t( 'DOP', 'Peso', 'Pesos', 'RD\$', 2,1),\n\t\t\t\t( 'DZD', 'Dinar', 'Dinars', '', 3,1),\n\t\t\t\t( 'EGP', 'Pound', 'Pounds', '£', 2,1),\n\t\t\t\t( 'MAD', 'Dirham', 'Dirhams', '', 2,1),\n\t\t\t\t( 'ERN', 'Nakfa', 'Nakfas', '', 2,1),\n\t\t\t\t( 'ETB', 'Birr', 'Birrs', '', 2,1),\n\t\t\t\t( 'FJD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'FKP', 'Pound', 'Pounds', '£', 2,1),\n\t\t\t\t( 'GBP', 'Pound', 'Pounds', '£', 2,1),\n\t\t\t\t( 'RUB', 'Ruble', 'Rubles', 'руб', 2,1),\n\t\t\t\t( 'GHS', 'Cedi', 'Cedis', '', 2,1),\n\t\t\t\t( 'GIP', 'Pound', 'Pounds', '£', 2,1),\n\t\t\t\t( 'GMD', 'Dalasi', 'Dalasis', '', 2,1),\n\t\t\t\t( 'GNF', 'Franc', 'Francs', '₣', 0,1),\n\t\t\t\t( 'GTQ', 'Quetzal', 'Quetzals', 'Q', 2,1),\n\t\t\t\t( 'GYD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'HKD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'HNL', 'Lempira', 'Lempiras', 'L', 2,1),\n\t\t\t\t( 'HRK', 'Kuna', 'Kunas', 'kn', 2,1),\n\t\t\t\t( 'HTG', 'Gourde', 'Gourdes', '', 2,1),\n\t\t\t\t( 'HUF', 'Forint', 'Forints', 'Ft', 2,1),\n\t\t\t\t( 'IDR', 'Rupiah', 'Rupiahs', 'Rp', 2,1),\n\t\t\t\t( 'ILS', 'Shekel', 'Shekels', '₪', 2,1),\n\t\t\t\t( 'INR', 'Rupee', 'Rupees', '\$', 2,1),\n\t\t\t\t( 'IQD', 'Dinar', 'Dinars', 'د.ع', 3,1),\n\t\t\t\t( 'IRR', 'Rial', 'Rials', '﷼', 2,1),\n\t\t\t\t( 'ISK', 'Króna', 'krónur', 'kr', 0,1),\n\t\t\t\t( 'JMD', 'Dollar', 'Dollars', 'J\$', 2,1),\n\t\t\t\t( 'JOD', 'Dinar', 'Dinars', '', 3,1),\n\t\t\t\t( 'JPY', 'Yen', 'Yens', '¥', 0,1),\n\t\t\t\t( 'KES', 'Shilling', 'Shillings', 'S', 2,1),\n\t\t\t\t( 'KGS', 'Som', 'Soms', 'лв', 2,1),\n\t\t\t\t( 'KHR', 'Riels', 'Rielss', '៛', 2,1),\n\t\t\t\t( 'KMF', 'Franc', 'Francs', '₣', 0,1),\n\t\t\t\t( 'KPW', 'Won', 'Wons', '₩', 2,1),\n\t\t\t\t( 'KRW', 'Won', 'Wons', '₩', 0,1),\n\t\t\t\t( 'KWD', 'Dinar', 'Dinars', '', 3,1),\n\t\t\t\t( 'KYD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'KZT', 'Tenge', 'Tenges', 'лв', 2,1),\n\t\t\t\t( 'LAK', 'Kip', 'Kips', '₭', 2,1),\n\t\t\t\t( 'LBP', 'Pound', 'Pounds', '£', 2,1),\n\t\t\t\t( 'LKR', 'Rupee', 'Rupees', '₨', 2,1),\n\t\t\t\t( 'LRD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'LSL', 'Loti', 'Lotis', '', 2,1),\n\t\t\t\t( 'LTL', 'Litas', 'Litass', 'Lt', 2,1),\n\t\t\t\t( 'LYD', 'Dinar', 'Dinars', '', 3,1),\n\t\t\t\t( 'MDL', 'Leu', 'Leus', '', 2,1),\n\t\t\t\t( 'MGA', 'Ariary', 'Ariarys', '', 2,1),\n\t\t\t\t( 'MKD', 'Denar', 'Denars', 'ден', 2,1),\n\t\t\t\t( 'MMK', 'Kyat', 'Kyats', '', 2,1),\n\t\t\t\t( 'MNT', 'Tugrik', 'Tugriks', '₮', 2,1),\n\t\t\t\t( 'MOP', 'Pataca', 'Patacas', '', 2,1),\n\t\t\t\t( 'MRO', 'Ouguiya', 'Ouguiyas', '', 2,1),\n\t\t\t\t( 'MUR', 'Rupee', 'Rupees', '₨', 2,1),\n\t\t\t\t( 'MVR', 'Rufiyaa', 'Rufiyaas', '', 2,1),\n\t\t\t\t( 'MWK', 'Kwacha', 'Kwachas', '', 2,1),\n\t\t\t\t( 'MXN', 'Peso', 'Pesos', '\$', 2,1),\n\t\t\t\t( 'MYR', 'Ringgit', 'Ringgits', 'RM', 2,1),\n\t\t\t\t( 'MZM', 'Meticail', 'Meticails', '', 2,1),\n\t\t\t\t( 'NAD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'XPF', 'Franc', 'Francs', '₣', 0,1),\n\t\t\t\t( 'NGN', 'Naira', 'Nairas', '₦', 2,1),\n\t\t\t\t( 'NIO', 'Cordoba', 'Cordobas', 'C\$', 2,1),\n\t\t\t\t( 'NOK', 'Krone', 'Krones', 'kr', 2,1),\n\t\t\t\t( 'NPR', 'Rupee', 'Rupees', '₨', 2,1),\n\t\t\t\t( 'OMR', 'Rial', 'Rials', '﷼', 3,1),\n\t\t\t\t( 'PAB', 'Balboa', 'Balboas', 'B/.', 2,1),\n\t\t\t\t( 'PEN', 'Sol', 'Sols', 'S/.', 2,1),\n\t\t\t\t( 'PGK', 'Kina', 'Kinas', '', 2,1),\n\t\t\t\t( 'PHP', 'Peso', 'Pesos', '₱', 2,1),\n\t\t\t\t( 'PKR', 'Rupee', 'Rupees', '₨', 2,1),\n\t\t\t\t( 'PLN', 'Zloty', 'Zlotys', 'zł', 2,1),\n\t\t\t\t( 'PYG', 'Guarani', 'Guaranis', 'Gs', 0,1),\n\t\t\t\t( 'QAR', 'Rial', 'Rials', '﷼', 2,1),\n\t\t\t\t( 'RON', 'Leu', 'Leus', 'lei', 2,1),\n\t\t\t\t( 'RWF', 'Franc', 'Francs', '₣', 0,1),\n\t\t\t\t( 'SAR', 'Rial', 'Rials', '﷼', 2,1),\n\t\t\t\t( 'SBD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'SCR', 'Rupee', 'Rupees', '₨', 2,1),\n\t\t\t\t( 'SDG', 'Pound', 'Pounds', '', 2,1),\n\t\t\t\t( 'SEK', 'Krona', 'Kronor', 'kr', 2,1),\n\t\t\t\t( 'SGD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'SHP', 'Pound', 'Pounds', '£', 2,1),\n\t\t\t\t( 'SLL', 'Leone', 'Leones', '', 2,1),\n\t\t\t\t( 'SOS', 'Shilling', 'Shillings', 'S', 2,1),\n\t\t\t\t( 'SRD', 'Dollar', 'Dollars', '\$', 2,1),\n\t\t\t\t( 'STD', 'Dobra', 'Dobras', '', 2,1),\n\t\t\t\t( 'SYP', 'Pound', 'Pounds', '£', 2,1),\n\t\t\t\t( 'SZL', 'Lilangeni', 'Lilangenis', '', 2,1),\n\t\t\t\t( 'THB', 'Baht', 'Bahts', '฿', 2,1),\n\t\t\t\t( 'TJS', 'Somoni', 'Somonis', '', 2,1),\n\t\t\t\t( 'TMM', 'Manat', 'Manats', '', 2,1),\n\t\t\t\t( 'TND', 'Dinar', 'Dinars', '', 3,1),\n\t\t\t\t( 'TOP', 'Pa''anga', 'Pa''angas', '', 2,1),\n\t\t\t\t( 'TRY', 'Lira', 'Liras', '\$', 2,1),\n\t\t\t\t( 'TTD', 'Dollar', 'Dollars', 'TT\$', 2,1),\n\t\t\t\t( 'TWD', 'Dollar', 'Dollars', 'NT\$', 2,1),\n\t\t\t\t( 'TZS', 'Shilling', 'Shillings', 'S', 2,1),\n\t\t\t\t( 'UAH', 'Hryvnia', 'Hryvnias', '₴', 2,1),\n\t\t\t\t( 'UGX', 'Shilling', 'Shillings', 'S', 2,1),\n\t\t\t\t( 'UYU', 'Peso', 'Pesos', '\$U', 2,1),\n\t\t\t\t( 'UZS', 'Som', 'Soms', 'лв', 2,1),\n\t\t\t\t( 'VEB', 'Bolivar', 'Bolivars', '', 2,1),\n\t\t\t\t( 'VND', 'Dong', 'Dongs', '₫', 2,1),\n\t\t\t\t( 'VUV', 'Vatu', 'Vatus', '', 0,1),\n\t\t\t\t( 'WST', 'Tala', 'Talas ', '', 2,1),\n\t\t\t\t( 'YER', 'Rial', 'Rials', '﷼', 2,1),\n\t\t\t\t( 'ZAR', 'Rand', 'Rands', 'R', 2,1),\n\t\t\t\t( 'ZMK', 'Kwacha', 'Kwachas', '', 2,1),\n\t\t\t\t( 'ZWD', 'Dollar', 'Dollars', 'Z\$', 2,1);"; $wpdb->query($SQL); } } }