Plugin Directory

Changeset 3072307

Timestamp:
04/17/2024 11:12:49 AM (3 months ago)
Author:
RealMag777
Message:

1 security issue fixed thanks to stealthcopter from Wordfence

Location:
woocommerce-currency-switcher/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • woocommerce-currency-switcher/trunk/classes/woocs.php

    r3047248 r3072307  
    518518        add_action('init', array($this, 'init_marketig_woocs'));
    519519
    520         //arder func
     520        //rder func
    521521
    522522        add_action('manage_posts_extra_tablenav', array($this, 'manage_posts_extra_tablenav'), 10, 1);
     523
     524
     525
     526
    523527
    524528        //add_filter( 'wc_get_price_thousand_separator', array($this, 'override_thousand_sep'));
     
    629633            }
    630634        }
     635
    631636//+++
    632637        if ($this->storage->is_isset('woocs_current_currency')) {
     
    12461251            wp_add_inline_style('woocommerce-currency-switcher', $this->add_css());
    12471252        }
     1253
    12481254        //+++
    12491255        //if customer paying pending order from the front
     
    12521258            if ($_GET['pay_for_order'] == 'true' AND isset($_GET['key'])) {
    12531259                $order_id = wc_get_order_id_by_order_key($_GET['key']);
    1254                 $currency = get_post_meta($order_id, '_order_currency', TRUE);
     1260                $order = wc_get_order($order_id);
     1261                if (!$order) {
     1262                    $currency = get_post_meta($order_id, '_order_currency', TRUE);
     1263                } else {
     1264                    $currency = $order->get_currency();
     1265                }
    12551266                $this->set_currency($currency);
    12561267            }
     
    13701381
    13711382    public function woocommerce_checkout_update_order_review() {
     1383
    13721384        if (!get_option('woocs_is_multiple_allowed', 0)) {
    13731385            $this->reset_currency();
     
    16941706    public function get_woocommerce_currency() {
    16951707
    1696         if (function_exists('has_block') && has_block('woocommerce/checkout')) {
    1697             $this->current_currency = 'EUR';
     1708        if (function_exists('has_block') && has_block('woocommerce/checkout')) {
     1709            $this->;
    16981710        }
    16991711
     
    41524164//ajax
    41534165    public function woocs_rates_current_currency() {
    4154         wp_die(do_shortcode('[woocs_rates exclude="' . $this->escape($_REQUEST['exclude']) . '" precision="' . $this->escape($_REQUEST['precision']) . '" current_currency="' . $this->escape($_REQUEST['current_currency']) . '"]'));
     4166        $currencies = $this->get_currencies();
     4167        $currency = sanitize_text_field($_REQUEST['current_currency']);
     4168        if (!isset($currencies[$currency])) {
     4169            $currency = $this->default_currency;
     4170        }
     4171        wp_die(do_shortcode('[woocs_rates exclude="' . esc_attr($_REQUEST['exclude']) . '" precision="' . (int) $_REQUEST['precision'] . '" current_currency="' . esc_attr($currency) . '"]'));
    41554172    }
    41564173
     
    43714388    public function woocommerce_shipping_free_shipping_is_available($is_available, $package, $this_shipping = null) {
    43724389        global $woocommerce;
    4373         $currencies = $this->get_currencies(); {
     4390        $currencies = $this->get_currencies();
     4391        {
    43744392            $has_coupon = false;
    43754393            $has_met_min_amount = false;
     
    63436361            <?php echo html_entity_decode('&lt;/script&gt;'); ?>
    63446362            </div>
    6345                 <?php
    6346             });
    6347         }
    6348 
    6349         public function get_admin_theme_id() {
    6350             //return intval(get_option('woocs_admin_theme_id', 0));
    6351             return 1;
    6352         }
    6353 
    6354         public function woocs_order_page_adapt_coupon_new($item_id, $item, $order_id) {
    6355             if (wp_doing_ajax() && isset($_POST['action']) && 'woocommerce_add_coupon_discount' == $_POST['action']) {
    6356                 $currencies = $this->get_currencies();
    6357                 $order = wc_get_order($order_id);
    6358                 $_order_currency = $order->get_currency();
    6359                 if (isset($currencies[$_order_currency])) {
    6360                     $this->set_currency($_order_currency);
    6361                 }
    6362             }
    6363         }
    6364 
    6365         public function woocs_order_page_adapt_coupon($classname, $order_type, $order_id) {
    6366 
    6367             if (wp_doing_ajax() && isset($_POST['action']) && 'woocommerce_add_coupon_discount' == $_POST['action']) {
    6368 
    6369                 $currencies = $this->get_currencies();
    6370                 //hpos
    6371                 $order = wc_get_order($order_id);
    6372                 // $_order_currency = $order->get_currency();
    6373                 //$order_rate = $order->get_meta('_woocs_order_rate', true);
    6374                 // $_order_currency = get_post_meta($order_id, '_order_currency', true);
    6375                 // $order_rate = get_post_meta($order_id, '_woocs_order_rate', true);
    6376                 //if (isset($currencies[$_order_currency])) {
    6377                 //  $this->set_currency($_order_currency);
    6378                 //  }
    6379             }
    6380             return $classname;
    6381         }
    6382 
    6383         public function write_log($message) {
    6384             $path = WOOCS_PATH . 'woocs.log';
    6385             $data_log = date("Y-m-d H:i:s") . " - " . $message . PHP_EOL;
    6386             file_put_contents($path, $data_log, FILE_APPEND);
    6387         }
    6388 
    6389         /**
    6390          * currency switching on the order editing page
    6391          * @param type WC_Order $order
    6392          */
    6393         public function order_edit_form_tag($order) {
     6363            <?php
     6364        });
     6365    }
     6366
     6367    public function get_admin_theme_id() {
     6368        //return intval(get_option('woocs_admin_theme_id', 0));
     6369        return 1;
     6370    }
     6371
     6372    public function woocs_order_page_adapt_coupon_new($item_id, $item, $order_id) {
     6373        if (wp_doing_ajax() && isset($_POST['action']) && 'woocommerce_add_coupon_discount' == $_POST['action']) {
     6374            $currencies = $this->get_currencies();
     6375            $order = wc_get_order($order_id);
     6376            $_order_currency = $order->get_currency();
     6377            if (isset($currencies[$_order_currency])) {
     6378                $this->set_currency($_order_currency);
     6379            }
     6380        }
     6381    }
     6382
     6383    public function woocs_order_page_adapt_coupon($classname, $order_type, $order_id) {
     6384
     6385        if (wp_doing_ajax() && isset($_POST['action']) && 'woocommerce_add_coupon_discount' == $_POST['action']) {
     6386
     6387            $currencies = $this->get_currencies();
     6388            //hpos
     6389            $order = wc_get_order($order_id);
     6390            // $_order_currency = $order->get_currency();
     6391            //$order_rate = $order->get_meta('_woocs_order_rate', true);
     6392            // $_order_currency = get_post_meta($order_id, '_order_currency', true);
     6393            // $order_rate = get_post_meta($order_id, '_woocs_order_rate', true);
     6394            //if (isset($currencies[$_order_currency])) {
     6395            //  $this->set_currency($_order_currency);
     6396            //  }
     6397        }
     6398        return $classname;
     6399    }
     6400
     6401    public function write_log($message) {
     6402        $path = WOOCS_PATH . 'woocs.log';
     6403        $data_log = date("Y-m-d H:i:s") . " - " . $message . PHP_EOL;
     6404        file_put_contents($path, $data_log, FILE_APPEND);
     6405    }
     6406
     6407    /**
     6408     * currency switching on the order editing page
     6409     * @param type WC_Order $order
     6410     */
     6411    public function order_edit_form_tag($order) {
     6412        $currency = $order->get_currency();
     6413        if (!empty($currency)) {
     6414            $_REQUEST['woocs_in_order_currency'] = $currency;
     6415            $this->current_currency = $currency;
     6416        }
     6417    }
     6418
     6419    /**
     6420     * currency switching in the order list
     6421     *
     6422     * @param string $buyer
     6423     * @param WC_Order $order
     6424     * @return string   $buyer Buyer name.
     6425     */
     6426    public function woocommerce_admin_order_buyer_name($buyer, $order) {
     6427        $currency = $order->get_currency();
     6428        if (!empty($currency)) {
     6429            $this->current_currency = $currency;
     6430        }
     6431        return $buyer;
     6432    }
     6433
     6434    public function override_my_account_orders($order) {
     6435        if ($order) {
     6436
    63946437            $currency = $order->get_currency();
    6395             if (!empty($currency)) {
    6396                 $_REQUEST['woocs_in_order_currency'] = $currency;
    6397                 $this->current_currency = $currency;
    6398             }
    6399         }
    6400 
    6401         /**
    6402          * currency switching in the order list
    6403          *
    6404          * @param string $buyer
    6405          * @param WC_Order $order
    6406          * @return string   $buyer Buyer name.
    6407          */
    6408         public function woocommerce_admin_order_buyer_name($buyer, $order) {
    6409             $currency = $order->get_currency();
     6438
    64106439            if (!empty($currency)) {
    64116440                $this->current_currency = $currency;
    64126441            }
    6413             return $buyer;
    6414         }
    6415     }
    6416    
     6442        }
     6443        $item_count = $order->get_item_count() - $order->get_item_count_refunded();
     6444        echo wp_kses_post(sprintf(_n('%1$s for %2$s item', '%1$s for %2$s items', $item_count, 'woocommerce'), $order->get_formatted_order_total(), $item_count));
     6445    }
     6446
     6447    public function override_my_account_order($order_id) {
     6448
     6449        $order = wc_get_order($order_id);
     6450        if ($order) {
     6451
     6452            $currency = $order->get_currency();
     6453
     6454            if (!empty($currency)) {
     6455                $this->current_currency = $currency;
     6456            }
     6457        }
     6458    }
     6459}
  • woocommerce-currency-switcher/trunk/index.php

    r3047248 r3072307  
    66  Description: Currency Switcher for WooCommerce that allows to the visitors and customers on your woocommerce store site switch currencies and optionally apply selected currency on checkout
    77  Author: realmag777
    8   Version: 1.4.1.8
     8  Version: 1.4.1.
    99  Requires at least: WP 4.9.0
    1010  Tested up to: WP 6.5
     
    1515  Author URI: https://pluginus.net/
    1616  WC requires at least: 6.0
    17   WC tested up to: 8.6
     17  WC tested up to: 8.
    1818 */
    1919
     
    6565}
    6666
    67 define('WOOCS_VERSION', '1.4.1.8');
     67define('WOOCS_VERSION', '1.4.1.');
    6868//define('WOOCS_VERSION', uniqid('woocs-'));
    6969define('WOOCS_MIN_WOOCOMMERCE', '6.0');
     
    8989include_once WOOCS_PATH . 'classes/world_currencies.php';
    9090
    91 //07-03-2024
     91//-2024
    9292class WOOCS_STARTER {
    9393
     
    120120        if (count($this->disable_plugin) AND !is_admin() AND (isset($_SERVER['SCRIPT_URI']) || isset($_SERVER['REQUEST_URI']))) {
    121121            $exclude = false;
    122             $url = $_SERVER['SCRIPT_URI'];
     122            $url = false;
     123            if (isset($_SERVER['SCRIPT_URI'])) {
     124                $url = $_SERVER['SCRIPT_URI'];
     125            }
    123126
    124127            if (!$url) {
  • woocommerce-currency-switcher/trunk/readme.txt

    r3047332 r3072307  
    66Tested up to: 6.5
    77Requires PHP: 7.2
    8 Stable tag: 1.4.1.8
     8Stable tag: 1.4.1.
    99
    1010
     
    185185
    186186== Changelog ==
     187
     188
     189
    187190
    188191= 1.4.1.8 =
  • woocommerce-currency-switcher/trunk/views/plugin_options_2.php

    r3049249 r3072307  
    3232                </span></h3>
    3333            <i><?php printf(esc_html__('Actualized for WooCommerce v.%s.x', 'woocommerce-currency-switcher'), $this->actualized_for) ?></i>
    34 
    35 
     34       
     35       
    3636            <?php if ($WOOCS->notes_for_free): ?>
    37 
    38 
    39                 <?php if (time() > 1710684000): ?>
    40 
    41                     <a href="https://codecanyon.pluginus.net/item/woocommerce-currency-switcher/8085217" style="position: absolute;
    42                        right: 0;
    43                        top: 19px;
    44                        background-color: #2f55d4;
    45                        border-color: #2f55d4;
    46                        color: #fff !important;
    47                        box-shadow: 0 3px 5px 0 rgb(47 85 212 / 30%);
    48                        display: flex;
    49                        justify-content: stretch;
    50                        align-items: center;
    51                        line-height: 29px;
    52                        "target="_blank" class="woocs__button"><span class="dashicons dashicons-money"></span>&nbsp;Get PRO</a>
    53 
    54                 <?php else: ?>
    55 
    56 
    57                     <a href="https://codecanyon.pluginus.net/item/woocommerce-currency-switcher/8085217" style="position: absolute;
    58                        right: 0;
    59                        top: -4px;
    60                        "target="_blank"><img width="120" src="https://pluginus.net/wp-content/uploads/2024/03/spring-sale-2024-33.png" alt=""></a>
    61 
    62                 <?php endif; ?>
    63 
    64             <?php endif; ?>
    65 
    66 
    67 
    68 
     37                <a href="https://codecanyon.pluginus.net/item/woocommerce-currency-switcher/8085217" style="position: absolute;
     38                   right: 0;
     39                   top: 19px;
     40                   background-color: #2f55d4;
     41                   border-color: #2f55d4;
     42                   color: #fff !important;
     43                   box-shadow: 0 3px 5px 0 rgb(47 85 212 / 30%);
     44                   display: flex;
     45                   justify-content: stretch;
     46                   align-items: center;
     47                   line-height: 29px;
     48                   "target="_blank" class="woocs__button"><span class="dashicons dashicons-money"></span>&nbsp;Get PRO</a>
     49               <?php endif; ?>
     50       
     51       
     52       
     53       
    6954        </div>
    7055
     
    156141                <div id="woocs-tabs-1" class="woocs__tab-pane woocs-show woocs-active">
    157142                    <div class="woocs__tab-content">
    158                         <input type="hidden" name="woocs_currency_nonce" value="<?php echo wp_create_nonce('currency_nonce'); ?>" >
    159                             <div class="woocs__tools-panel">
    160                                 <div class="woocs__options">
    161                                     <a href="javascript: void(0)" id="woocs_add_currency" data-action="prepend" class="woocs__button"><span class="icon-plus"></span><?php esc_html_e("Prepend Currency", 'woocommerce-currency-switcher') ?></a>
    162                                     <a href="javascript: woocs_update_all_rates(); void(0);" class="woocs__button"><span class="icon-arrows-cw"></span><?php esc_html_e("Update all rates", 'woocommerce-currency-switcher') ?></a>
    163                                     <a href="javascript: woocs_add_money_sign2(); void(0);" class="woocs__button"><span class="icon-plus"></span><?php esc_html_e("Add custom currency symbols", 'woocommerce-currency-switcher') ?></a>
    164 
    165                                     <a href="javascript: void(0)" id="woocs_add_currencies" class="woocs__button"><span class="dashicons dashicons-money"></span>&nbsp;<?php esc_html_e("Currency Wizard", 'woocommerce-currency-switcher') ?></a>
    166                                 </div>
    167 
    168                                 <div class="woocs_drop_down_view_panel">
    169                                     <?php
    170                                     $opts = array(
    171                                         'no' => esc_html__('Not styled drop-down', 'woocommerce-currency-switcher'),
    172                                         'style-1' => esc_html__('Style #1', 'woocommerce-currency-switcher'),
    173                                         'style-2' => esc_html__('Style #2', 'woocommerce-currency-switcher'),
    174                                         'style-3' => esc_html__('Style #3', 'woocommerce-currency-switcher'),
    175                                         'flags' => esc_html__('Flags (as images)', 'woocommerce-currency-switcher'),
    176                                         //+++
    177                                         'ddslick' => esc_html__('ddslick drop-down', 'woocommerce-currency-switcher'),
    178                                         'chosen' => esc_html__('Chosen drop-down', 'woocommerce-currency-switcher'),
    179                                         'chosen_dark' => esc_html__('Chosen dark drop-down', 'woocommerce-currency-switcher'),
    180                                         'wselect' => esc_html__('wSelect drop-down', 'woocommerce-currency-switcher')
    181                                     );
    182 
    183                                     $selected = trim(get_option('woocs_drop_down_view', 'ddslick'));
    184                                     ?>
    185 
    186                                     <label for="woocs_drop_down_view" class="woocs-options-valign-top"><?php woocs_draw_tooltip(esc_html__('How to display currency switcher (by default) on the site front. (NEW) Make your attention on skins with numbers - you can use them on the same page with different designs in shortcode [woocs] described in its attribute style and style number (see Codex page in Info Help tab)!', 'woocommerce-currency-switcher')) ?></label>
    187 
    188                                     <select name="woocs_drop_down_view" id="woocs_drop_down_view" class="chosen_select woocs-options-fix1">
    189                                         <?php foreach ($opts as $key => $value) : ?>
    190                                             <option value="<?= $key ?>" <?php selected($key === $selected) ?>><?= $value ?></option>
    191                                         <?php endforeach; ?>
    192                                     </select>
     143                        <input type="hidden" name="woocs_currency_nonce" value="<?php echo wp_create_nonce('currency_nonce'); ?>" >
     144                        <div class="woocs__tools-panel">
     145                            <div class="woocs__options">
     146                                <a href="javascript: void(0)" id="woocs_add_currency" data-action="prepend" class="woocs__button"><span class="icon-plus"></span><?php esc_html_e("Prepend Currency", 'woocommerce-currency-switcher') ?></a>
     147                                <a href="javascript: woocs_update_all_rates(); void(0);" class="woocs__button"><span class="icon-arrows-cw"></span><?php esc_html_e("Update all rates", 'woocommerce-currency-switcher') ?></a>
     148                                <a href="javascript: woocs_add_money_sign2(); void(0);" class="woocs__button"><span class="icon-plus"></span><?php esc_html_e("Add custom currency symbols", 'woocommerce-currency-switcher') ?></a>
     149
     150                                <a href="javascript: void(0)" id="woocs_add_currencies" class="woocs__button"><span class="dashicons dashicons-money"></span>&nbsp;<?php esc_html_e("Currency Wizard", 'woocommerce-currency-switcher') ?></a>
     151                            </div>
     152
     153                            <div class="woocs_drop_down_view_panel">
     154                                <?php
     155                                $opts = array(
     156                                    'no' => esc_html__('Not styled drop-down', 'woocommerce-currency-switcher'),
     157                                    'style-1' => esc_html__('Style #1', 'woocommerce-currency-switcher'),
     158                                    'style-2' => esc_html__('Style #2', 'woocommerce-currency-switcher'),
     159                                    'style-3' => esc_html__('Style #3', 'woocommerce-currency-switcher'),
     160                                    'flags' => esc_html__('Flags (as images)', 'woocommerce-currency-switcher'),
     161                                    //+++
     162                                    'ddslick' => esc_html__('ddslick drop-down', 'woocommerce-currency-switcher'),
     163                                    'chosen' => esc_html__('Chosen drop-down', 'woocommerce-currency-switcher'),
     164                                    'chosen_dark' => esc_html__('Chosen dark drop-down', 'woocommerce-currency-switcher'),
     165                                    'wselect' => esc_html__('wSelect drop-down', 'woocommerce-currency-switcher')
     166                                );
     167
     168                                $selected = trim(get_option('woocs_drop_down_view', 'ddslick'));
     169                                ?>
     170
     171                                <label for="woocs_drop_down_view" class="woocs-options-valign-top"><?php woocs_draw_tooltip(esc_html__('How to display currency switcher (by default) on the site front. (NEW) Make your attention on skins with numbers - you can use them on the same page with different designs in shortcode [woocs] described in its attribute style and style number (see Codex page in Info Help tab)!', 'woocommerce-currency-switcher')) ?></label>
     172
     173                                <select name="woocs_drop_down_view" id="woocs_drop_down_view" class="chosen_select woocs-options-fix1">
     174                                    <?php foreach ($opts as $key => $value) : ?>
     175                                        <option value="<?= $key ?>" <?php selected($key === $selected) ?>><?= $value ?></option>
     176                                    <?php endforeach; ?>
     177                                </select>
     178                            </div>
     179                        </div>
     180
     181                        <div class="woocs_settings_hide">
     182                            <template id="woocs_item_tpl"><?php
     183                                $empty = array(
     184                                    'name' => '',
     185                                    'rate' => 0,
     186                                    'symbol' => '',
     187                                    'position' => '',
     188                                    'is_etalon' => 0,
     189                                    'description' => '',
     190                                    'hide_cents' => 0
     191                                );
     192                                woocs_print_currency($this, $empty);
     193                                ?>
     194                            </template>
     195                        </div>
     196
     197                        <div class="scrollbar-external_wrapper">
     198                            <div class="scrollbar-external">
     199                                <div id="woocs-currencies-options">
     200                                    <table class="woocs__table woocs__data-table">
     201                                        <thead>
     202                                            <tr>
     203                                                <th><?php echo esc_html__('Basic', 'woocommerce-currency-switcher') ?></th>
     204                                                <th><?php echo esc_html__('Move', 'woocommerce-currency-switcher') ?></th>
     205
     206                                                <th><span class="icon-flag" title="<?php echo esc_html__('Flag', 'woocommerce-currency-switcher') ?>"></span></th>
     207                                                <th><span class="icon-money" title="<?php echo esc_html__('Currency', 'woocommerce-currency-switcher') ?>"></span></th>
     208                                                <th><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm.31-8.86c-1.77-.45-2.34-.94-2.34-1.67c0-.84.79-1.43 2.1-1.43c1.38 0 1.9.66 1.94 1.64h1.71c-.05-1.34-.87-2.57-2.49-2.97V5H10.9v1.69c-1.51.32-2.72 1.3-2.72 2.81c0 1.79 1.49 2.69 3.66 3.21c1.95.46 2.34 1.15 2.34 1.87c0 .53-.39 1.39-2.1 1.39c-1.6 0-2.23-.72-2.32-1.64H8.04c.1 1.7 1.36 2.66 2.86 2.97V19h2.34v-1.67c1.52-.29 2.72-1.16 2.73-2.77c-.01-2.2-1.9-2.96-3.66-3.42z" fill="currentColor"/></svg></th>
     209                                                <th><?php echo esc_html__('Position', 'woocommerce-currency-switcher') ?></th>
     210                                                <th><?php echo esc_html__('Rate+%', 'woocommerce-currency-switcher') ?></th>
     211                                                <th class="woocs_align_left"><?php echo esc_html__('Decimal', 'woocommerce-currency-switcher') ?></th>
     212
     213                                                <th class="woocs_align_left"><?php echo esc_html__('Separators', 'woocommerce-currency-switcher') ?></th>
     214
     215                                                <th><?php echo esc_html__('Visible', 'woocommerce-currency-switcher') ?></th>
     216                                                <th><?php echo esc_html__('Cents', 'woocommerce-currency-switcher') ?></th>
     217                                                <th><?php echo esc_html__('Description', 'woocommerce-currency-switcher') ?></th>
     218                                                <th>X</th>
     219                                            </tr>
     220                                        </thead>
     221                                        <tbody id="woocs_list">
     222
     223                                            <?php
     224                                            if (!empty($currencies) AND is_array($currencies)) {
     225                                                foreach ($currencies as $key => $currency) {
     226                                                    woocs_print_currency($this, $currency);
     227                                                }
     228                                            }
     229                                            ?>
     230                                        </tbody>
     231                                    </table>
    193232                                </div>
    194233                            </div>
    195234
    196                             <div class="woocs_settings_hide">
    197                                 <template id="woocs_item_tpl"><?php
    198                                     $empty = array(
    199                                         'name' => '',
    200                                         'rate' => 0,
    201                                         'symbol' => '',
    202                                         'position' => '',
    203                                         'is_etalon' => 0,
    204                                         'description' => '',
    205                                         'hide_cents' => 0
    206                                     );
    207                                     woocs_print_currency($this, $empty);
    208                                     ?>
    209                                 </template>
     235                        </div>
     236
     237                        <div class="external-scroll_wrapper">
     238                            <div class="external-scroll_x">
     239                                <div class="scroll-element_outer">
     240                                    <div class="scroll-element_size"></div>
     241                                    <div class="scroll-element_track"></div>
     242                                    <div class="scroll-bar"></div>
     243                                </div>
    210244                            </div>
    211 
    212                             <div class="scrollbar-external_wrapper">
    213                                 <div class="scrollbar-external">
    214                                     <div id="woocs-currencies-options">
    215                                         <table class="woocs__table woocs__data-table">
    216                                             <thead>
    217                                                 <tr>
    218                                                     <th><?php echo esc_html__('Basic', 'woocommerce-currency-switcher') ?></th>
    219                                                     <th><?php echo esc_html__('Move', 'woocommerce-currency-switcher') ?></th>
    220 
    221                                                     <th><span class="icon-flag" title="<?php echo esc_html__('Flag', 'woocommerce-currency-switcher') ?>"></span></th>
    222                                                     <th><span class="icon-money" title="<?php echo esc_html__('Currency', 'woocommerce-currency-switcher') ?>"></span></th>
    223                                                     <th><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm.31-8.86c-1.77-.45-2.34-.94-2.34-1.67c0-.84.79-1.43 2.1-1.43c1.38 0 1.9.66 1.94 1.64h1.71c-.05-1.34-.87-2.57-2.49-2.97V5H10.9v1.69c-1.51.32-2.72 1.3-2.72 2.81c0 1.79 1.49 2.69 3.66 3.21c1.95.46 2.34 1.15 2.34 1.87c0 .53-.39 1.39-2.1 1.39c-1.6 0-2.23-.72-2.32-1.64H8.04c.1 1.7 1.36 2.66 2.86 2.97V19h2.34v-1.67c1.52-.29 2.72-1.16 2.73-2.77c-.01-2.2-1.9-2.96-3.66-3.42z" fill="currentColor"/></svg></th>
    224                                                     <th><?php echo esc_html__('Position', 'woocommerce-currency-switcher') ?></th>
    225                                                     <th><?php echo esc_html__('Rate+%', 'woocommerce-currency-switcher') ?></th>
    226                                                     <th class="woocs_align_left"><?php echo esc_html__('Decimal', 'woocommerce-currency-switcher') ?></th>
    227 
    228                                                     <th class="woocs_align_left"><?php echo esc_html__('Separators', 'woocommerce-currency-switcher') ?></th>
    229 
    230                                                     <th><?php echo esc_html__('Visible', 'woocommerce-currency-switcher') ?></th>
    231                                                     <th><?php echo esc_html__('Cents', 'woocommerce-currency-switcher') ?></th>
    232                                                     <th><?php echo esc_html__('Description', 'woocommerce-currency-switcher') ?></th>
    233                                                     <th>X</th>
    234                                                 </tr>
    235                                             </thead>
    236                                             <tbody id="woocs_list">
    237 
    238                                                 <?php
    239                                                 if (!empty($currencies) AND is_array($currencies)) {
    240                                                     foreach ($currencies as $key => $currency) {
    241                                                         woocs_print_currency($this, $currency);
    242                                                     }
    243                                                 }
    244                                                 ?>
    245                                             </tbody>
    246                                         </table>
     245                        </div>
     246
     247                        <div class="woocs_settings_codes woocs__options">
     248                            <a href="javascript: void(0)" id="woocs_add_currency2" data-action="append" class="woocs__button"><span class="icon-plus"></span><?php esc_html_e("Append Currency", 'woocommerce-currency-switcher') ?></a>
     249                            &nbsp;<a href="http://en.wikipedia.org/wiki/ISO_4217#Active_codes" target="_blank" class="woocs__button">
     250                                <?php esc_html_e("Read wiki about Currency Active codes  <-  Get right currencies codes here if you are not sure about it!", 'woocommerce-currency-switcher') ?>
     251                            </a>
     252                        </div>
     253
     254                        <div id="woocs_currencies_modal" class="woocs_modal2" style="display: none;" >
     255
     256                            <div class="woot-modal">
     257                                <div class="woot-modal-inner">
     258                                    <div class="woot-modal-inner-header">
     259                                        <h3 class="woot-modal-title"></h3>
     260                                        <div class="woot-modal-title-info"></div>
     261                                        <a href="javascript: void(0);" class="woot-modal-close"></a>
    247262                                    </div>
    248                                 </div>
    249 
    250                             </div>
    251 
    252                             <div class="external-scroll_wrapper">
    253                                 <div class="external-scroll_x">
    254                                     <div class="scroll-element_outer">
    255                                         <div class="scroll-element_size"></div>
    256                                         <div class="scroll-element_track"></div>
    257                                         <div class="scroll-bar"></div>
     263                                    <div class="woot-modal-inner-content">
     264                                        <div class="woot-form-element-container">
     265
     266
     267                                            <?php if (!$WOOCS->notes_for_free): ?>
     268                                                <div class="woocs_modal_options2">
     269
     270                                                    <div class="woocs__alert woocs__alert-info">
     271                                                        <p>
     272                                                            <?php esc_html_e("Install your own set of selected currencies in one click! Also you can install from here only one selected currency. Remember: if you not found currency you need here - you can always add it by hands using Prepend/Append Currency button! If you do not like preselected currency symbols you can always add your own in tab Options.", 'woocommerce-currency-switcher') ?>
     273                                                        </p>
     274                                                    </div>
     275
     276
     277                                                    <select multiple="" class="chosen_select">
     278                                                        <?php
     279                                                        $currency_keys = array_keys($currencies);
     280
     281                                                        foreach ($WOOCS->world_currencies->get_currencies_title() as $c_code => $c_value) {
     282                                                            ?>
     283                                                            <?php
     284                                                            $c_disabled = "";
     285                                                            if (in_array($c_code, $currency_keys)) {
     286                                                                $c_disabled = 'disabled="disabled"';
     287                                                            }
     288                                                            ?>
     289                                                            <option <?php echo esc_html($c_disabled); ?> value="<?php echo esc_attr($c_code); ?>"><?php echo esc_html($c_value); ?></option>
     290                                                        <?php } ?>
     291                                                    </select>
     292                                                    <div>
     293                                                        <a href="javascript: void(0);" class="woocs__button woocs_add_currencies"><span class="icon-dollar"></span><?php esc_html_e("Install selected currencies", 'woocommerce-currency-switcher') ?></a>
     294                                                        <div id="woocs_currencies_modal_data">
     295                                                            <?php ?>
     296                                                        </div>
     297                                                    </div>
     298                                                </div>
     299
     300                                            <?php else: ?>
     301
     302                                                <div class="woocs__alert woocs__alert-info">
     303                                                    <p>
     304                                                        <?php esc_html_e("Install your own set of selected currencies in one click. Disabled in free version as has no sense because of 2 currencies limitation.", 'woocommerce-currency-switcher') ?>
     305                                                    </p>
     306                                                </div>
     307
     308                                            <?php endif; ?>
     309                                        </div>
     310                                    </div>
     311                                    <div class="woot-modal-inner-footer">
     312                                        <a href="javascript: void(0);" class="woot-btn woot-modal-close woocs__button">Close</a>
    258313                                    </div>
    259314                                </div>
    260315                            </div>
    261316
    262                             <div class="woocs_settings_codes woocs__options">
    263                                 <a href="javascript: void(0)" id="woocs_add_currency2" data-action="append" class="woocs__button"><span class="icon-plus"></span><?php esc_html_e("Append Currency", 'woocommerce-currency-switcher') ?></a>
    264                                 &nbsp;<a href="http://en.wikipedia.org/wiki/ISO_4217#Active_codes" target="_blank" class="woocs__button">
    265                                     <?php esc_html_e("Read wiki about Currency Active codes  <-  Get right currencies codes here if you are not sure about it!", 'woocommerce-currency-switcher') ?>
    266                                 </a>
    267                             </div>
    268 
    269                             <div id="woocs_currencies_modal" class="woocs_modal2" style="display: none;" >
    270 
    271                                 <div class="woot-modal">
    272                                     <div class="woot-modal-inner">
    273                                         <div class="woot-modal-inner-header">
    274                                             <h3 class="woot-modal-title"></h3>
    275                                             <div class="woot-modal-title-info"></div>
    276                                             <a href="javascript: void(0);" class="woot-modal-close"></a>
    277                                         </div>
    278                                         <div class="woot-modal-inner-content">
    279                                             <div class="woot-form-element-container">
    280 
    281 
    282                                                 <?php if (!$WOOCS->notes_for_free): ?>
    283                                                     <div class="woocs_modal_options2">
    284 
    285                                                         <div class="woocs__alert woocs__alert-info">
    286                                                             <p>
    287                                                                 <?php esc_html_e("Install your own set of selected currencies in one click! Also you can install from here only one selected currency. Remember: if you not found currency you need here - you can always add it by hands using Prepend/Append Currency button! If you do not like preselected currency symbols you can always add your own in tab Options.", 'woocommerce-currency-switcher') ?>
    288                                                             </p>
    289                                                         </div>
    290 
    291 
    292                                                         <select multiple="" class="chosen_select">
    293                                                             <?php
    294                                                             $currency_keys = array_keys($currencies);
    295 
    296                                                             foreach ($WOOCS->world_currencies->get_currencies_title() as $c_code => $c_value) {
    297                                                                 ?>
    298                                                                 <?php
    299                                                                 $c_disabled = "";
    300                                                                 if (in_array($c_code, $currency_keys)) {
    301                                                                     $c_disabled = 'disabled="disabled"';
    302                                                                 }
    303                                                                 ?>
    304                                                                 <option <?php echo esc_html($c_disabled); ?> value="<?php echo esc_attr($c_code); ?>"><?php echo esc_html($c_value); ?></option>
    305                                                             <?php } ?>
    306                                                         </select>
    307                                                         <div>
    308                                                             <a href="javascript: void(0);" class="woocs__button woocs_add_currencies"><span class="icon-dollar"></span><?php esc_html_e("Install selected currencies", 'woocommerce-currency-switcher') ?></a>
    309                                                             <div id="woocs_currencies_modal_data">
    310                                                                 <?php ?>
    311                                                             </div>
    312                                                         </div>
    313                                                     </div>
    314 
    315                                                 <?php else: ?>
    316 
    317                                                     <div class="woocs__alert woocs__alert-info">
    318                                                         <p>
    319                                                             <?php esc_html_e("Install your own set of selected currencies in one click. Disabled in free version as has no sense because of 2 currencies limitation.", 'woocommerce-currency-switcher') ?>
    320                                                         </p>
    321                                                     </div>
    322 
    323                                                 <?php endif; ?>
    324                                             </div>
    325                                         </div>
    326                                         <div class="woot-modal-inner-footer">
    327                                             <a href="javascript: void(0);" class="woot-btn woot-modal-close woocs__button">Close</a>
    328                                         </div>
    329                                     </div>
    330                                 </div>
    331 
    332                                 <div class="woot-modal-backdrop"></div>
    333 
    334                             </div>
     317                            <div class="woot-modal-backdrop"></div>
     318
     319                        </div>
    335320
    336321
     
    17511736
    17521737                                                                    </div>
    1753 
    1754 
     1738                                                                   
     1739                                                                   
    17551740                                                                    <div class="woocs-card-item">
    17561741
     
    18901875
    18911876                                                    <div id="tab-smart-designer" class="woocs__tab-pane woocs_settings_section">
    1892 
     1877                                                       
    18931878                                                        <div class="woocs__tab-content">
    18941879
     
    18971882                                                                <div class="woocs__tools-panel">
    18981883                                                                    <h5><?php esc_html_e("Smart Designer", 'woocommerce-currency-switcher') ?></h5>
    1899                                                                     <input type="hidden" name="woocs_wpnonce_sd" value="<?php echo wp_create_nonce('woocs_wpnonce_sd'); ?>" >
     1884<input type="hidden" name="woocs_wpnonce_sd" value="<?php echo wp_create_nonce('woocs_wpnonce_sd'); ?>" >
    19001885                                                                </div>
    19011886
     
    19041889                                                                    <div class="woocs__alert woocs__alert-success"><?php esc_html_e("In this section you can create your own view of currency drop-down switcher", 'woocommerce-currency-switcher'); ?></div>
    19051890
    1906 
     1891                                                                   
    19071892                                                                    <a href="#" id="woocs-sd-create" class="woocs__button dashicons-before dashicons-plus"><?php esc_html_e("Create", 'woocommerce-currency-switcher') ?></a><br />
    19081893
     
    19921977                                                                    <div><a href="javascript: woocs_sd_exit_no_save();void(0);" class="woocs-panel-button dashicons-before dashicons-exit"><?php esc_html_e("Exit without save", 'woocommerce-currency-switcher') ?></a>&nbsp;</div>
    19931978                                                                    <div><a href="javascript: woocs_sd_reset();void(0);" class="woocs-panel-button dashicons-before dashicons-dismiss"><?php esc_html_e("Reset to default", 'woocommerce-currency-switcher') ?></a>&nbsp;</div>
    1994 
    1995                                                                 </div>
     1979                                                                   
     1980</div>
    19961981                                                            </template>
    19971982
Note: See TracChangeset for help on using the changeset viewer.