Changeset 3072307
- Timestamp:
- 04/17/2024 11:12:49 AM (3 months ago)
- Location:
- woocommerce-currency-switcher/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-currency-switcher/trunk/classes/woocs.php
r3047248 r3072307 518 518 add_action('init', array($this, 'init_marketig_woocs')); 519 519 520 // arder func520 //rder func 521 521 522 522 add_action('manage_posts_extra_tablenav', array($this, 'manage_posts_extra_tablenav'), 10, 1); 523 524 525 526 523 527 524 528 //add_filter( 'wc_get_price_thousand_separator', array($this, 'override_thousand_sep')); … … 629 633 } 630 634 } 635 631 636 //+++ 632 637 if ($this->storage->is_isset('woocs_current_currency')) { … … 1246 1251 wp_add_inline_style('woocommerce-currency-switcher', $this->add_css()); 1247 1252 } 1253 1248 1254 //+++ 1249 1255 //if customer paying pending order from the front … … 1252 1258 if ($_GET['pay_for_order'] == 'true' AND isset($_GET['key'])) { 1253 1259 $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 } 1255 1266 $this->set_currency($currency); 1256 1267 } … … 1370 1381 1371 1382 public function woocommerce_checkout_update_order_review() { 1383 1372 1384 if (!get_option('woocs_is_multiple_allowed', 0)) { 1373 1385 $this->reset_currency(); … … 1694 1706 public function get_woocommerce_currency() { 1695 1707 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->; 1698 1710 } 1699 1711 … … 4152 4164 //ajax 4153 4165 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) . '"]')); 4155 4172 } 4156 4173 … … 4371 4388 public function woocommerce_shipping_free_shipping_is_available($is_available, $package, $this_shipping = null) { 4372 4389 global $woocommerce; 4373 $currencies = $this->get_currencies(); { 4390 $currencies = $this->get_currencies(); 4391 { 4374 4392 $has_coupon = false; 4375 4393 $has_met_min_amount = false; … … 6343 6361 <?php echo html_entity_decode('</script>'); ?> 6344 6362 </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 6394 6437 $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 6410 6439 if (!empty($currency)) { 6411 6440 $this->current_currency = $currency; 6412 6441 } 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 6 6 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 7 7 Author: realmag777 8 Version: 1.4.1. 88 Version: 1.4.1. 9 9 Requires at least: WP 4.9.0 10 10 Tested up to: WP 6.5 … … 15 15 Author URI: https://pluginus.net/ 16 16 WC requires at least: 6.0 17 WC tested up to: 8. 617 WC tested up to: 8. 18 18 */ 19 19 … … 65 65 } 66 66 67 define('WOOCS_VERSION', '1.4.1. 8');67 define('WOOCS_VERSION', '1.4.1.'); 68 68 //define('WOOCS_VERSION', uniqid('woocs-')); 69 69 define('WOOCS_MIN_WOOCOMMERCE', '6.0'); … … 89 89 include_once WOOCS_PATH . 'classes/world_currencies.php'; 90 90 91 // 07-03-202491 //-2024 92 92 class WOOCS_STARTER { 93 93 … … 120 120 if (count($this->disable_plugin) AND !is_admin() AND (isset($_SERVER['SCRIPT_URI']) || isset($_SERVER['REQUEST_URI']))) { 121 121 $exclude = false; 122 $url = $_SERVER['SCRIPT_URI']; 122 $url = false; 123 if (isset($_SERVER['SCRIPT_URI'])) { 124 $url = $_SERVER['SCRIPT_URI']; 125 } 123 126 124 127 if (!$url) { -
woocommerce-currency-switcher/trunk/readme.txt
r3047332 r3072307 6 6 Tested up to: 6.5 7 7 Requires PHP: 7.2 8 Stable tag: 1.4.1. 88 Stable tag: 1.4.1. 9 9 10 10 … … 185 185 186 186 == Changelog == 187 188 189 187 190 188 191 = 1.4.1.8 = -
woocommerce-currency-switcher/trunk/views/plugin_options_2.php
r3049249 r3072307 32 32 </span></h3> 33 33 <i><?php printf(esc_html__('Actualized for WooCommerce v.%s.x', 'woocommerce-currency-switcher'), $this->actualized_for) ?></i> 34 35 34 35 36 36 <?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> 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> Get PRO</a> 49 <?php endif; ?> 50 51 52 53 69 54 </div> 70 55 … … 156 141 <div id="woocs-tabs-1" class="woocs__tab-pane woocs-show woocs-active"> 157 142 <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> <?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> <?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> 193 232 </div> 194 233 </div> 195 234 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> 210 244 </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 <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> 247 262 </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> 258 313 </div> 259 314 </div> 260 315 </div> 261 316 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 <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> 335 320 336 321 … … 1751 1736 1752 1737 </div> 1753 1754 1738 1739 1755 1740 <div class="woocs-card-item"> 1756 1741 … … 1890 1875 1891 1876 <div id="tab-smart-designer" class="woocs__tab-pane woocs_settings_section"> 1892 1877 1893 1878 <div class="woocs__tab-content"> 1894 1879 … … 1897 1882 <div class="woocs__tools-panel"> 1898 1883 <h5><?php esc_html_e("Smart Designer", 'woocommerce-currency-switcher') ?></h5> 1899 1884 <input type="hidden" name="woocs_wpnonce_sd" value="<?php echo wp_create_nonce('woocs_wpnonce_sd'); ?>" > 1900 1885 </div> 1901 1886 … … 1904 1889 <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> 1905 1890 1906 1891 1907 1892 <a href="#" id="woocs-sd-create" class="woocs__button dashicons-before dashicons-plus"><?php esc_html_e("Create", 'woocommerce-currency-switcher') ?></a><br /> 1908 1893 … … 1992 1977 <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> </div> 1993 1978 <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> </div> 1994 1995 1979 1980 </div> 1996 1981 </template> 1997 1982
Note: See TracChangeset
for help on using the changeset viewer.