WooCommerce Multilingual – run WooCommerce with WPML - Version 4.1.2

Version Description

  • Fixed the currency switcher not being displayed correctly when using the Storefront theme
  • Fixed an incompatibility with an older WPML version leading to a fatal error
  • Fixed the currency switcher css being loaded when no currency switcher was displayed
  • Fixed a bug causing an error when upgrading WooCommerce Multilingual to version 4.1 with WooCommerce inactive.
Download this release

Release Info

Developer sergey.r
Plugin Icon 128x128 WooCommerce Multilingual – run WooCommerce with WPML
Version 4.1.2
Comparing to
See all releases

Code changes from version 4.1.1 to 4.1.2

Files changed (34) hide show
  1. inc/class-wcml-upgrade.php +47 -37
  2. inc/class-woocommerce-wpml.php +0 -2
  3. inc/currencies/class-wcml-currency-switcher-widget.php +0 -25
  4. inc/currencies/class-wcml-currency-switcher.php +0 -185
  5. inc/currencies/currency-switcher/class-wcml-currency-switcher-templates.php +24 -19
  6. inc/currencies/currency-switcher/class-wcml-currency-switcher.php +14 -14
  7. inc/currencies/currency-switcher/class-wcml-file.php +1 -1
  8. inc/deprecated-WC-functions.php +0 -69
  9. inc/template-classes/class-wpml-templates-factory.php +0 -78
  10. inc/template-classes/setup/class-wcml-setup-introduction-ui.php +1 -1
  11. readme.txt +7 -1
  12. res/js/cart_widget.min.js +1 -1
  13. res/js/currency-switcher-settings.min.js +1 -1
  14. res/js/dialogs.min.js +1 -1
  15. res/js/jquery.cookie.min.js +1 -1
  16. res/js/languages_notice.min.js +1 -1
  17. res/js/lock_fields.min.js +1 -1
  18. res/js/multi-currency.min.js +1 -1
  19. res/js/pointer.min.js +1 -1
  20. res/js/scripts.min.js +1 -1
  21. res/js/tooltip_init.min.js +1 -1
  22. res/js/troubleshooting.min.js +1 -1
  23. res/js/wcml-multi-currency.min.js +1 -1
  24. res/js/wcml-translation-editor.min.js +1 -1
  25. templates/currency-switchers/legacy-dropdown-click/style.css +1 -1
  26. templates/currency-switchers/legacy-dropdown-click/style.scss +1 -0
  27. templates/currency-switchers/legacy-dropdown/style.css +1 -1
  28. templates/currency-switchers/legacy-dropdown/style.scss +1 -0
  29. vendor/autoload.php +1 -1
  30. vendor/autoload_52.php +1 -1
  31. vendor/composer/autoload_real.php +4 -4
  32. vendor/composer/autoload_real_52.php +3 -3
  33. vendor/composer/autoload_static.php +5 -5
  34. wpml-woocommerce.php +2 -2
inc/class-wcml-upgrade.php CHANGED
@@ -117,6 +117,11 @@ class WCML_Upgrade{
117
  if($migration_ran || empty($version_in_db)){
118
  update_option('_wcml_version', WCML_VERSION);
119
  }
 
 
 
 
 
120
  }
121
 
122
  function upgrade_2_9_9_1(){
@@ -532,55 +537,60 @@ class WCML_Upgrade{
532
  function upgrade_4_1_0(){
533
  global $wpdb;
534
 
535
- $results = $wpdb->get_results("
 
 
 
536
  SELECT *
537
  FROM {$wpdb->postmeta}
538
  WHERE meta_key LIKE '_price_%' OR meta_key LIKE '_regular_price_%' OR ( meta_key LIKE '_sale_price_%' AND meta_key NOT LIKE '_sale_price_dates%' )
539
  ");
540
 
541
- foreach( $results as $price ){
542
- $formatted_price = wc_format_decimal( $price->meta_value );
543
- update_post_meta( $price->post_id, $price->meta_key, $formatted_price );
 
 
 
 
544
 
545
- if( get_post_type( $price->post_id ) == 'product_variation' ){
546
- delete_transient( 'wc_var_prices_'.wp_get_post_parent_id( $price->post_id ) );
547
  }
548
 
549
- }
550
-
551
- $wcml_settings = get_option( '_wcml_settings' );
552
 
553
- if( $wcml_settings[ 'currency_switcher_style' ] == 'list' ){
554
- if( $wcml_settings[ 'wcml_curr_sel_orientation' ] == 'horizontal' ){
555
- $switcher_style = 'wcml-horizontal-list';
 
 
 
 
 
 
556
  }else{
557
- $switcher_style = 'wcml-vertical-list';
558
  }
559
- }else{
560
- $switcher_style = 'wcml-dropdown';
561
- }
562
-
563
- $wcml_settings[ 'currency_switchers' ][ 'product' ] = array(
564
- 'switcher_style' => $switcher_style,
565
- 'template' => $wcml_settings[ 'wcml_curr_template' ],
566
- 'widget_title' => '',
567
- 'color_scheme' => array(
568
- 'font_current_normal' => '',
569
- 'font_current_hover' => '',
570
- 'background_current_normal' => '',
571
- 'background_current_hover' => '',
572
- 'font_other_normal' => '',
573
- 'font_other_hover' => '',
574
- 'background_other_normal' => '',
575
- 'background_other_hover' => '',
576
- 'border_normal' => ''
577
- )
578
- );
579
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
580
 
581
- $wcml_settings[ 'currency_switcher_additional_css' ] = '';
582
- update_option('_wcml_settings', $wcml_settings );
 
583
  }
584
-
585
-
586
  }
117
  if($migration_ran || empty($version_in_db)){
118
  update_option('_wcml_version', WCML_VERSION);
119
  }
120
+
121
+ if( get_option( '_wcml_4_1_0_migration_required' ) && class_exists( 'woocommerce' ) ){
122
+ $this->upgrade_4_1_0();
123
+ delete_option('_wcml_4_1_0_migration_required' );
124
+ }
125
  }
126
 
127
  function upgrade_2_9_9_1(){
537
  function upgrade_4_1_0(){
538
  global $wpdb;
539
 
540
+ if( !class_exists( 'woocommerce' ) ){
541
+ update_option( '_wcml_4_1_0_migration_required', true );
542
+ }else{
543
+ $results = $wpdb->get_results("
544
  SELECT *
545
  FROM {$wpdb->postmeta}
546
  WHERE meta_key LIKE '_price_%' OR meta_key LIKE '_regular_price_%' OR ( meta_key LIKE '_sale_price_%' AND meta_key NOT LIKE '_sale_price_dates%' )
547
  ");
548
 
549
+ foreach( $results as $price ){
550
+ $formatted_price = wc_format_decimal( $price->meta_value );
551
+ update_post_meta( $price->post_id, $price->meta_key, $formatted_price );
552
+
553
+ if( get_post_type( $price->post_id ) == 'product_variation' ){
554
+ delete_transient( 'wc_var_prices_'.wp_get_post_parent_id( $price->post_id ) );
555
+ }
556
 
 
 
557
  }
558
 
559
+ $wcml_settings = get_option( '_wcml_settings' );
 
 
560
 
561
+ if(
562
+ isset( $wcml_settings[ 'currency_switcher_style' ] ) &&
563
+ $wcml_settings[ 'currency_switcher_style' ] == 'list'
564
+ ){
565
+ if( $wcml_settings[ 'wcml_curr_sel_orientation' ] == 'horizontal' ){
566
+ $switcher_style = 'wcml-horizontal-list';
567
+ }else{
568
+ $switcher_style = 'wcml-vertical-list';
569
+ }
570
  }else{
571
+ $switcher_style = 'wcml-dropdown';
572
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
573
 
574
+ $wcml_settings[ 'currency_switchers' ][ 'product' ] = array(
575
+ 'switcher_style' => $switcher_style,
576
+ 'template' => isset( $wcml_settings[ 'wcml_curr_template' ] ) ? $wcml_settings[ 'wcml_curr_template' ] : '',
577
+ 'widget_title' => '',
578
+ 'color_scheme' => array(
579
+ 'font_current_normal' => '',
580
+ 'font_current_hover' => '',
581
+ 'background_current_normal' => '',
582
+ 'background_current_hover' => '',
583
+ 'font_other_normal' => '',
584
+ 'font_other_hover' => '',
585
+ 'background_other_normal' => '',
586
+ 'background_other_hover' => '',
587
+ 'border_normal' => ''
588
+ )
589
+ );
590
 
591
+ $wcml_settings[ 'currency_switcher_additional_css' ] = '';
592
+ update_option('_wcml_settings', $wcml_settings );
593
+ }
594
  }
595
+
 
596
  }
inc/class-woocommerce-wpml.php CHANGED
@@ -69,9 +69,7 @@ class woocommerce_wpml {
69
  public function __construct(){
70
 
71
  $this->settings = $this->get_settings();
72
-
73
  $this->currencies = new WCML_Currencies( $this );
74
-
75
  $this->xdomain_data = new WCML_xDomain_Data;
76
 
77
  new WCML_Widgets( $this );
69
  public function __construct(){
70
 
71
  $this->settings = $this->get_settings();
 
72
  $this->currencies = new WCML_Currencies( $this );
 
73
  $this->xdomain_data = new WCML_xDomain_Data;
74
 
75
  new WCML_Widgets( $this );
inc/currencies/class-wcml-currency-switcher-widget.php DELETED
@@ -1,25 +0,0 @@
1
- <?php
2
-
3
- class WCML_Currency_Switcher_Widget extends WP_Widget {
4
-
5
- function __construct() {
6
-
7
- parent::__construct( 'currency_sel_widget', __('Currency switcher', 'woocommerce-multilingual'), __('Currency switcher', 'woocommerce-multilingual'));
8
- }
9
-
10
- function widget($args, $instance) {
11
-
12
- echo $args['before_widget'];
13
-
14
- do_action('wcml_currency_switcher');
15
-
16
- echo $args['after_widget'];
17
- }
18
-
19
- function form( $instance ) {
20
-
21
- printf('<p><a href="%s">%s</a></p>',admin_url('admin.php?page=wpml-wcml&tab=multi-currency#currency-switcher'),__('Configure options', 'woocommerce-multilingual'));
22
- return;
23
-
24
- }
25
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/currencies/class-wcml-currency-switcher.php DELETED
@@ -1,185 +0,0 @@
1
- <?php
2
-
3
- class WCML_Currency_Switcher {
4
-
5
- private $woocommerce_wpml;
6
-
7
- public function __construct() {
8
- global $woocommerce_wpml;
9
-
10
- $this->woocommerce_wpml =& $woocommerce_wpml;
11
-
12
- add_action( 'init', array($this, 'init'), 5 );
13
-
14
- }
15
-
16
- public function init() {
17
-
18
- add_action( 'wp_ajax_wcml_currencies_order', array($this, 'wcml_currencies_order') );
19
- add_action( 'wp_ajax_wcml_currencies_switcher_preview', array($this, 'wcml_currencies_switcher_preview') );
20
-
21
- add_action( 'wcml_currency_switcher', array($this, 'wcml_currency_switcher') );
22
- //@deprecated 3.9
23
- add_action( 'currency_switcher', array($this, 'currency_switcher') );
24
-
25
- add_shortcode( 'currency_switcher', array($this, 'currency_switcher_shortcode') );
26
-
27
- // Built in currency switcher
28
- add_action( 'woocommerce_product_meta_start', array($this, 'show_currency_switcher') );
29
-
30
- }
31
-
32
- public function wcml_currencies_order() {
33
- $nonce = filter_input( INPUT_POST, 'wcml_nonce', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
34
- if ( !$nonce || !wp_verify_nonce( $nonce, 'set_currencies_order_nonce' ) ) {
35
- die('Invalid nonce');
36
- }
37
- global $woocommerce_wpml;
38
-
39
- $woocommerce_wpml->settings['currencies_order'] = explode( ';', $_POST['order'] );
40
- $woocommerce_wpml->update_settings();
41
- echo json_encode( array('message' => __( 'Currencies order updated', 'woocommerce-multilingual' )) );
42
- die;
43
- }
44
-
45
- public function wcml_currencies_switcher_preview() {
46
- $nonce = filter_input( INPUT_POST, 'wcml_nonce', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
47
- if ( !$nonce || !wp_verify_nonce( $nonce, 'wcml_currencies_switcher_preview' ) ) {
48
- die('Invalid nonce');
49
- }
50
-
51
- echo $this->wcml_currency_switcher(
52
- array(
53
- 'format' => $_POST['template'] ? stripslashes_deep( $_POST['template'] ) : '%name% (%symbol%) - %code%',
54
- 'switcher_style' => $_POST['switcher_type'],
55
- 'orientation' => $_POST['orientation']
56
- )
57
- );
58
-
59
- die();
60
- }
61
-
62
- public function currency_switcher_shortcode( $atts ) {
63
- extract( shortcode_atts( array(), $atts ) );
64
-
65
- ob_start();
66
- $this->wcml_currency_switcher( $atts );
67
- $html = ob_get_contents();
68
- ob_end_clean();
69
-
70
- return $html;
71
- }
72
-
73
- public function wcml_currency_switcher( $args = array() ) {
74
- global $sitepress;
75
-
76
- if ( is_page( wc_get_page_id( 'myaccount' ) ) ) {
77
- return '';
78
- }
79
-
80
- if( $args === '' ){
81
- $args = array();
82
- }
83
-
84
- $wcml_settings = $this->woocommerce_wpml->get_settings();
85
- $multi_currency_object =& $this->woocommerce_wpml->multi_currency;
86
-
87
- if ( !isset($args['switcher_style']) ) {
88
- $args['switcher_style'] = isset($wcml_settings['currency_switcher_style']) ? $wcml_settings['currency_switcher_style'] : 'dropdown';
89
- }
90
-
91
- if ( !isset($args['orientation']) ) {
92
- $args['orientation'] = isset($wcml_settings['wcml_curr_sel_orientation']) ? $wcml_settings['wcml_curr_sel_orientation'] : 'vertical';
93
- }
94
-
95
- if ( !isset($args['format']) ) {
96
- $args['format'] = isset($wcml_settings['wcml_curr_template']) && $wcml_settings['wcml_curr_template'] != '' ?
97
- $wcml_settings['wcml_curr_template'] : '%name% (%symbol%) - %code%';
98
- }
99
-
100
- $preview = '';
101
- $show_currency_switcher = true;
102
-
103
- $display_custom_prices = isset( $wcml_settings[ 'display_custom_prices' ] ) && $wcml_settings[ 'display_custom_prices' ];
104
-
105
- $is_cart_or_checkout = is_page( wc_get_page_id( 'cart' ) ) || is_page( wc_get_page_id( 'checkout' ) );
106
-
107
- if ( $display_custom_prices ) {
108
- if( $is_cart_or_checkout ){
109
- $show_currency_switcher = false;
110
- }elseif( is_product() ){
111
- $current_product_id = get_post()->ID;
112
- $original_product_language = $this->woocommerce_wpml->products->get_original_product_language( $current_product_id );
113
-
114
- $use_custom_prices = get_post_meta(
115
- apply_filters( 'translate_object_id', $current_product_id, get_post_type( $current_product_id ), true, $original_product_language ),
116
- '_wcml_custom_prices_status',
117
- true
118
- );
119
-
120
- if ( !$use_custom_prices ) $show_currency_switcher = false;
121
- }
122
- }
123
-
124
- if ( $show_currency_switcher ) {
125
-
126
- $currencies = isset($wcml_settings['currencies_order']) ?
127
- $wcml_settings['currencies_order'] :
128
- $multi_currency_object->get_currency_codes();
129
-
130
- if ( count($currencies) > 1) {
131
-
132
- if ( !is_admin() ) {
133
- foreach ( $currencies as $k => $currency ) {
134
- if ( $wcml_settings['currency_options'][$currency]['languages'][$sitepress->get_current_language()] != 1 ) {
135
- unset( $currencies[$k] );
136
- }
137
- }
138
- }
139
-
140
- $currency_switcher = new WCML_Currency_Switcher_UI( $args, $this->woocommerce_wpml, $currencies );
141
- $preview = $currency_switcher->get_view();
142
-
143
- } else{
144
-
145
- if( is_admin() ){
146
-
147
- $preview = '<i>' . __("You haven't added any secondary currencies.", 'woocommerce-multilingual') . '</i>';
148
-
149
- }else{
150
-
151
- $preview = '';
152
-
153
- }
154
-
155
- }
156
-
157
- }
158
-
159
- if ( !isset($args['echo']) || $args['echo'] ) {
160
- echo $preview;
161
- } else {
162
- return $preview;
163
- }
164
-
165
- }
166
-
167
- public function show_currency_switcher() {
168
- $settings = $this->woocommerce_wpml->get_settings();
169
-
170
- if ( is_product() && isset($settings['currency_switcher_product_visibility']) && $settings['currency_switcher_product_visibility'] === 1 ) {
171
- echo(do_shortcode( '[currency_switcher]' ));
172
- echo '<br />';
173
- }
174
-
175
- }
176
-
177
- /**
178
- * @deprecated 3.9
179
- */
180
- public function currency_switcher( $args = array() ){
181
- $this->wcml_currency_switcher( $args );
182
- }
183
-
184
-
185
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/currencies/currency-switcher/class-wcml-currency-switcher-templates.php CHANGED
@@ -68,14 +68,18 @@ class WCML_Currency_Switcher_Templates {
68
  $wcml_settings = $this->woocommerce_wpml->get_settings();
69
 
70
  if( isset( $wcml_settings[ 'currency_switchers' ] ) ){
71
- foreach( $wcml_settings[ 'currency_switchers' ] as $switcher ){
 
 
 
 
72
  foreach( $this->templates as $key => $template ){
73
  if( $switcher['switcher_style'] == $key && !isset( $templates[$key] ) ){
74
  $templates[$key] = $template;
75
  }
76
  }
77
  }
78
- }else{
79
  //set default template to active
80
  $templates['wcml-dropdown'] = $this->templates['wcml-dropdown'];
81
  }
@@ -317,31 +321,32 @@ class WCML_Currency_Switcher_Templates {
317
  }
318
  }
319
 
320
- if( isset( $wcml_settings[ 'currency_switchers' ] ) ){
321
- foreach( $wcml_settings[ 'currency_switchers' ] as $key => $switcher_data ){
 
322
 
323
- $switcher_template = $switcher_data['switcher_style'];
324
- $css = $this->get_color_picket_css( $key, $switcher_data );
325
- $template = $templates[ $switcher_template ];
326
 
327
- if ( $template->has_styles() ) {
328
- wp_add_inline_style( $template->get_inline_style_handler(), $css );
329
- }else{
330
- echo $this->get_inline_style( $key, $switcher_template, $css );
 
331
  }
332
  }
333
- }
334
 
335
- if ( ! empty( $wcml_settings['currency_switcher_additional_css'] ) ) {
336
- $additional_css = $this->sanitize_css( $wcml_settings['currency_switcher_additional_css'] );
337
 
338
- if( $style_handler ){
339
- wp_add_inline_style( $style_handler, $additional_css );
340
- }else{
341
- echo $this->get_inline_style( 'currency_switcher', 'additional_css', $additional_css );
 
342
  }
343
  }
344
-
345
  }
346
 
347
  /**
68
  $wcml_settings = $this->woocommerce_wpml->get_settings();
69
 
70
  if( isset( $wcml_settings[ 'currency_switchers' ] ) ){
71
+ foreach( $wcml_settings[ 'currency_switchers' ] as $switcher_id => $switcher ){
72
+ if( 'product' === $switcher_id && 0 === $wcml_settings[ 'currency_switcher_product_visibility' ] ){
73
+ continue;
74
+ }
75
+
76
  foreach( $this->templates as $key => $template ){
77
  if( $switcher['switcher_style'] == $key && !isset( $templates[$key] ) ){
78
  $templates[$key] = $template;
79
  }
80
  }
81
  }
82
+ }elseif( isset( $wcml_settings[ 'currency_switcher_product_visibility' ] ) && $wcml_settings[ 'currency_switcher_product_visibility' ] === 1 ){
83
  //set default template to active
84
  $templates['wcml-dropdown'] = $this->templates['wcml-dropdown'];
85
  }
321
  }
322
  }
323
 
324
+ if( $templates ){
325
+ if( isset( $wcml_settings[ 'currency_switchers' ] ) ){
326
+ foreach( $wcml_settings[ 'currency_switchers' ] as $key => $switcher_data ){
327
 
328
+ $switcher_template = $switcher_data['switcher_style'];
329
+ $css = $this->get_color_picket_css( $key, $switcher_data );
330
+ $template = $templates[ $switcher_template ];
331
 
332
+ if ( $template->has_styles() ) {
333
+ wp_add_inline_style( $template->get_inline_style_handler(), $css );
334
+ }else{
335
+ echo $this->get_inline_style( $key, $switcher_template, $css );
336
+ }
337
  }
338
  }
 
339
 
340
+ if ( ! empty( $wcml_settings['currency_switcher_additional_css'] ) ) {
341
+ $additional_css = $this->sanitize_css( $wcml_settings['currency_switcher_additional_css'] );
342
 
343
+ if( $style_handler ){
344
+ wp_add_inline_style( $style_handler, $additional_css );
345
+ }else{
346
+ echo $this->get_inline_style( 'currency_switcher', 'additional_css', $additional_css );
347
+ }
348
  }
349
  }
 
350
  }
351
 
352
  /**
inc/currencies/currency-switcher/class-wcml-currency-switcher.php CHANGED
@@ -42,7 +42,8 @@ class WCML_Currency_Switcher{
42
  }
43
 
44
  public function currency_switcher_shortcode( $atts ) {
45
- extract( shortcode_atts( array(), $atts ) );
 
46
 
47
  ob_start();
48
  $this->wcml_currency_switcher( $atts );
@@ -63,24 +64,23 @@ class WCML_Currency_Switcher{
63
 
64
  $wcml_settings = $this->woocommerce_wpml->get_settings();
65
  $multi_currency_object =& $this->woocommerce_wpml->multi_currency;
 
66
 
67
- if( isset( $args[ 'switcher_id' ] ) && isset( $wcml_settings[ 'currency_switchers' ][ $args[ 'switcher_id' ] ] ) ){
68
-
69
  $currency_switcher_settings = $wcml_settings[ 'currency_switchers' ][ $args[ 'switcher_id' ] ];
 
70
 
71
- if ( !isset( $args[ 'switcher_style' ] ) ) {
72
- $args[ 'switcher_style' ] = isset( $currency_switcher_settings[ 'switcher_style' ] ) ? $currency_switcher_settings[ 'switcher_style' ] : 'wcml-dropdown';
73
- }
74
-
75
- if ( !isset( $args[ 'format' ] ) ) {
76
- $args[ 'format' ] = isset( $currency_switcher_settings[ 'template' ] ) && $currency_switcher_settings[ 'template' ] != '' ?
77
- $currency_switcher_settings[ 'template' ] : '%name% (%symbol%) - %code%';
78
- }
79
 
80
- if ( !isset( $args[ 'color_scheme' ] ) ) {
81
- $args[ 'color_scheme' ] = isset($currency_switcher_settings['color_scheme']) ? $currency_switcher_settings['color_scheme'] : array();
82
- }
 
83
 
 
 
84
  }
85
 
86
  $preview = '';
42
  }
43
 
44
  public function currency_switcher_shortcode( $atts ) {
45
+
46
+ $atts = (array) $atts;
47
 
48
  ob_start();
49
  $this->wcml_currency_switcher( $atts );
64
 
65
  $wcml_settings = $this->woocommerce_wpml->get_settings();
66
  $multi_currency_object =& $this->woocommerce_wpml->multi_currency;
67
+ $currency_switcher_settings = array();
68
 
69
+ if( isset( $wcml_settings[ 'currency_switchers' ][ $args[ 'switcher_id' ] ] ) ){
 
70
  $currency_switcher_settings = $wcml_settings[ 'currency_switchers' ][ $args[ 'switcher_id' ] ];
71
+ }
72
 
73
+ if ( !isset( $args[ 'switcher_style' ] ) ) {
74
+ $args[ 'switcher_style' ] = isset( $currency_switcher_settings[ 'switcher_style' ] ) ? $currency_switcher_settings[ 'switcher_style' ] : 'wcml-dropdown';
75
+ }
 
 
 
 
 
76
 
77
+ if ( !isset( $args[ 'format' ] ) ) {
78
+ $args[ 'format' ] = isset( $currency_switcher_settings[ 'template' ] ) && '' !== $currency_switcher_settings[ 'template' ] ?
79
+ $currency_switcher_settings[ 'template' ] : '%name% (%symbol%) - %code%';
80
+ }
81
 
82
+ if ( !isset( $args[ 'color_scheme' ] ) ) {
83
+ $args[ 'color_scheme' ] = isset($currency_switcher_settings['color_scheme']) ? $currency_switcher_settings['color_scheme'] : array();
84
  }
85
 
86
  $preview = '';
inc/currencies/currency-switcher/class-wcml-file.php CHANGED
@@ -33,7 +33,7 @@ class WCML_File {
33
  public function get_uri_from_path( $path ) {
34
  $base = null;
35
 
36
- if ( $this->wp_api->defined( 'WP_CONTENT_DIR' ) && $this->wp_api->defined( 'WP_CONTENT_URL' ) ) {
37
  $base_path = $this->fix_dir_separator( $this->wp_api->constant( 'WP_CONTENT_DIR' ) );
38
 
39
  if ( 0 === strpos( $path, $base_path ) ) {
33
  public function get_uri_from_path( $path ) {
34
  $base = null;
35
 
36
+ if ( $this->wp_api->constant( 'WP_CONTENT_DIR' ) && $this->wp_api->constant( 'WP_CONTENT_URL' ) ) {
37
  $base_path = $this->fix_dir_separator( $this->wp_api->constant( 'WP_CONTENT_DIR' ) );
38
 
39
  if ( 0 === strpos( $path, $base_path ) ) {
inc/deprecated-WC-functions.php DELETED
@@ -1,69 +0,0 @@
1
- <?php
2
-
3
- class Deprecated_WC_Functions{
4
-
5
- public static function is_deprecated(){
6
-
7
- if( version_compare( WC_VERSION , '2.7', '<' ) ){
8
- return true;
9
- }else{
10
- return false;
11
- }
12
-
13
- }
14
-
15
- public static function get_product_id( $product ){
16
- if( self::is_deprecated() ){
17
- return $product->id;
18
- }else{
19
- return $product->get_id();
20
- }
21
- }
22
-
23
- public static function get_product_type( $product_id ){
24
- if( self::is_deprecated() ){
25
- $product = wc_get_product( $product_id );
26
- return $product->product_type;
27
- }else{
28
- return WC_Product_Factory::get_product_type( $product_id );
29
- }
30
- }
31
-
32
- public static function reduce_stock( $product_id, $qty ){
33
- if( self::is_deprecated() ){
34
- $product = wc_get_product( $product_id );
35
- return $product->reduce_stock( $qty );
36
- }else{
37
- return wc_update_product_stock( $product_id, $qty, 'decrease' );
38
- }
39
- }
40
-
41
- public static function increase_stock( $product_id, $qty ){
42
- if( self::is_deprecated() ){
43
- $product = wc_get_product( $product_id );
44
- return $product->increase_stock( $qty );
45
- }else{
46
- return wc_update_product_stock( $product_id, $qty, 'increase' );
47
- }
48
- }
49
-
50
- public static function set_stock( $product_id, $qty ){
51
- if( self::is_deprecated() ){
52
- $product = wc_get_product( $product_id );
53
- return $product->set_stock( $qty );
54
- }else{
55
- return wc_update_product_stock( $product_id, $qty, 'set' );
56
- }
57
- }
58
-
59
- public static function get_order_currency( $order ){
60
- if( self::is_deprecated() ){
61
- return $order->get_order_currency();
62
- }else{
63
- return $order->get_currency();
64
- }
65
- }
66
-
67
- }
68
-
69
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/template-classes/class-wpml-templates-factory.php DELETED
@@ -1,78 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class WPML_Templates_Factory
5
- * Used in the absence of WPML to render WCML basic menus
6
- */
7
-
8
- abstract class WPML_Templates_Factory {
9
- protected $template_paths;
10
- /**
11
- * @var Twig_Environment
12
- */
13
- private $twig;
14
-
15
- public function __construct( $custom_functions = array(), $custom_filters = array() ) {
16
- $this->init_template_base_dir();
17
- $this->custom_functions = $custom_functions;
18
- $this->custom_filters = $custom_filters;
19
- }
20
-
21
- abstract protected function init_template_base_dir();
22
-
23
- public function show( $template = null, $model = null ) {
24
- echo $this->get_view( $template, $model );
25
- }
26
-
27
- /**
28
- * @param $template
29
- * @param $model
30
- *
31
- * @return string
32
- */
33
- public function get_view( $template = null, $model = null ) {
34
- $this->maybe_init_twig();
35
-
36
- if ( $model === null ) {
37
- $model = $this->get_model();
38
- }
39
- if ( $template === null ) {
40
- $template = $this->get_template();
41
- }
42
-
43
- $view = $this->twig->render( $template, $model );
44
-
45
- return $view;
46
- }
47
-
48
- private function maybe_init_twig() {
49
- if ( ! isset( $this->twig ) ) {
50
- $loader = new Twig_Loader_Filesystem( $this->template_paths );
51
-
52
- $environment_args = array();
53
- if ( WP_DEBUG ) {
54
- $environment_args[ 'debug' ] = true;
55
- }
56
-
57
- $this->twig = new Twig_Environment( $loader, $environment_args );
58
- if ( isset( $this->custom_functions ) && count( $this->custom_functions ) > 0 ) {
59
- foreach ( $this->custom_functions as $custom_function ) {
60
- $this->twig->addFunction( $custom_function );
61
- }
62
- }
63
- if ( isset( $this->custom_filters ) && count( $this->custom_filters ) > 0 ) {
64
- foreach ( $this->custom_filters as $custom_filter ) {
65
- $this->twig->addFilter( $custom_filter );
66
- }
67
- }
68
- }
69
- }
70
-
71
- abstract public function get_template();
72
-
73
- abstract public function get_model();
74
-
75
- protected function &get_twig() {
76
- return $this->twig;
77
- }
78
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
inc/template-classes/setup/class-wcml-setup-introduction-ui.php CHANGED
@@ -22,7 +22,7 @@ class WCML_Setup_Introduction_UI extends WPML_Templates_Factory {
22
  'description2' => array(
23
 
24
  'title' => __("We'll help you:", 'woocommerce-multilingual'),
25
- 'step1' => __('Translate the &quot;store&quot; pages', 'woocommerce-multilingual'),
26
  'step2' => __("Choose which attributes to make translatable", 'woocommerce-multilingual'),
27
  'step3' => __("Choose if you need multiple currencies", 'woocommerce-multilingual'),
28
 
22
  'description2' => array(
23
 
24
  'title' => __("We'll help you:", 'woocommerce-multilingual'),
25
+ 'step1' => __("Translate the 'store' pages", 'woocommerce-multilingual'),
26
  'step2' => __("Choose which attributes to make translatable", 'woocommerce-multilingual'),
27
  'step3' => __("Choose if you need multiple currencies", 'woocommerce-multilingual'),
28
 
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: CMS, woocommerce, commerce, ecommerce, e-commerce, products, WPML, multili
5
  License: GPLv2
6
  Requires at least: 3.9
7
  Tested up to: 4.7.3
8
- Stable tag: 4.1.1
9
 
10
  Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
11
 
@@ -142,6 +142,12 @@ WooCommerce Multilingual is compatible with all major WooCommerce extensions. We
142
 
143
  == Changelog ==
144
 
 
 
 
 
 
 
145
  = 4.1.1 =
146
  * Fixed fatal error that was occurring when using an older version of WPML (introduced in version 4.1.0)
147
  * Fixed a bug causing a 'Invalid or duplicated SKU when saving or updating product' warning when editing a product
5
  License: GPLv2
6
  Requires at least: 3.9
7
  Tested up to: 4.7.3
8
+ Stable tag: 4.1.2
9
 
10
  Allows running fully multilingual e-commerce sites using WooCommerce and WPML.
11
 
142
 
143
  == Changelog ==
144
 
145
+ = 4.1.2 =
146
+ * Fixed the currency switcher not being displayed correctly when using the Storefront theme
147
+ * Fixed an incompatibility with an older WPML version leading to a fatal error
148
+ * Fixed the currency switcher css being loaded when no currency switcher was displayed
149
+ * Fixed a bug causing an error when upgrading WooCommerce Multilingual to version 4.1 with WooCommerce inactive.
150
+
151
  = 4.1.1 =
152
  * Fixed fatal error that was occurring when using an older version of WPML (introduced in version 4.1.0)
153
  * Fixed a bug causing a 'Invalid or duplicated SKU when saving or updating product' warning when editing a product
res/js/cart_widget.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){try{wc_cart_fragments_params.ajax_url.toString()+"-wc_cart_hash";(""==sessionStorage.getItem("woocommerce_cart_hash")||1==actions.is_lang_switched||1==actions.is_currency_switched)&&sessionStorage.removeItem("wc_fragments")}catch(b){}});
1
+ jQuery(document).ready(function(a){try{wc_cart_fragments_params.ajax_url.toString();""!=sessionStorage.getItem("woocommerce_cart_hash")&&1!=actions.is_lang_switched&&1!=actions.is_currency_switched||sessionStorage.removeItem("wc_fragments")}catch(a){}});
res/js/currency-switcher-settings.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){WCML_Currency_Switcher_Settings={_currency_languages_saving:0,init:function(){a(document).ready(function(){a(document).on("change","#currency_switcher_style",WCML_Currency_Switcher_Settings.update_currency_switcher_style),a(document).on("click",".currency_switcher_save",WCML_Currency_Switcher_Settings.save_currency_switcher_settings),a(document).on("click",".delete_currency_switcher",WCML_Currency_Switcher_Settings.delete_currency_switcher),a(document).on("change",".js-wcml-cs-colorpicker-preset",WCML_Currency_Switcher_Settings.set_currency_switcher_color_pre_set),a(document).on("keyup",'input[name="wcml_curr_template"]',WCML_Currency_Switcher_Settings.setup_currency_switcher_template_keyup),a(document).on("change",'input[name="wcml_curr_template"]',WCML_Currency_Switcher_Settings.setup_currency_switcher_template_change),WCML_Currency_Switcher_Settings.open_dialog_from_hash()})},initColorPicker:function(){a(".wcml-ui-dialog .js-wcml-cs-panel-colors").find(".js-wcml-cs-colorpicker").wpColorPicker({change:function(b){var c=a(this).closest(".wcml-ui-dialog");WCML_Currency_Switcher_Settings.currency_switcher_preview(c)},clear:function(b){var c=a(this).closest(".wcml-ui-dialog");WCML_Currency_Switcher_Settings.currency_switcher_preview(c)}})},save_currency_switcher_settings:function(){var b=a(this).closest(".wcml-ui-dialog"),c=a('<span class="spinner" style="visibility: visible;"></span>'),d=b.find("#wcml-cs-widget option:selected").text(),e=b.find("#wcml_currencies_switcher_id").val(),f=b.find("#wcml-cs-widget").val(),g=b.find('input[name="wcml_cs_widget_title"]').val(),h=b.find("#currency_switcher_style").val();c.show(),a(this).parent().append(c),b.find(":submit,:button").prop("disabled",!0);var i=b.find('input[name="wcml_curr_template"]').val();i||(i=b.find("#currency_switcher_default").val());var j={};return b.find("input.js-wcml-cs-colorpicker").each(function(){j[a(this).attr("name")]=a(this).val()}),a.ajax({type:"POST",dataType:"json",url:ajaxurl,data:{action:"wcml_currencies_switcher_save_settings",wcml_nonce:b.find("#wcml_currencies_switcher_save_settings_nonce").val(),switcher_id:e,widget_id:f,widget_title:g,switcher_style:h,template:i,color_scheme:j},success:function(g){if(b.find(".ui-dialog-titlebar-close").trigger("click"),"undefined"==typeof f&&(f=e),a("#wcml_currency_switcher_options_form_new_widget #wcml-cs-widget option").each(function(){a(this).val()==f&&a(this).remove()}),0==a("#wcml_currency_switcher_options_form_new_widget #wcml-cs-widget option").length&&a(".wcml_add_cs_sidebar").fadeOut(),a("#currency-switcher-widget .wcml-cs-list").find("thead tr").is(":hidden")&&a("#currency-switcher-widget .wcml-cs-list").find("thead tr").fadeIn(),0==a(".wcml-currency-preview."+f).length){var h=a(".wcml-cs-empty-row").clone();h.removeClass("wcml-cs-empty-row"),h.find(".wcml-currency-preview").addClass(f),h.find(".wcml-cs-widget-name").html(d),h.find(".edit_currency_switcher").attr("data-switcher",f),h.find(".edit_currency_switcher").attr("data-dialog","wcml_currency_switcher_options_"+f),h.find(".edit_currency_switcher").attr("data-content","wcml_currency_switcher_options_"+f),h.find(".delete_currency_switcher").attr("data-switcher",f),h.show(),a(".wcml-cs-list").find("tr.wcml-cs-empty-row").before(h),a(".wcml-cs-list").is(":hidden")&&a(".wcml-cs-list").fadeIn()}a("#wcml_currency_switcher_options_"+f).remove(),b.find(".wcml-dialog-container").attr("id","wcml-dialog-wcml_currency_switcher_options_"+f),b.find(":submit,:button").prop("disabled",!1),b.find("#wcml_currencies_switcher_id").val(f),c.remove(),WCML_Currency_Switcher_Settings.currency_switcher_preview(b,!0)}}),!1},delete_currency_switcher:function(b){b.preventDefault();var c=a(this).data("switcher"),d=a(this).closest("tr"),e=a('<span class="spinner" style="visibility: visible;">');a(this).parent().html(e),a.ajax({type:"POST",dataType:"json",url:ajaxurl,data:{action:"wcml_delete_currency_switcher",wcml_nonce:a("#wcml_delete_currency_switcher_nonce").val(),switcher_id:c},success:function(b){var e=d.find(".wcml-cs-widget-name").html();a("#wcml_currency_switcher_options_form_new_widget #wcml-cs-widget").append('<option value="'+c+'">'+e+"</option>"),d.remove(),1==a("#currency-switcher-widget .wcml-cs-list").find("tbody tr").length&&a("#currency-switcher-widget .wcml-cs-list").find("thead tr").fadeOut(),a(".wcml_add_cs_sidebar").is(":hidden")&&a(".wcml_add_cs_sidebar").fadeIn()}})},currency_switcher_preview:_.debounce(function(b,c){var d=b.find('input[name="wcml_curr_template"]').val();d||(d=b.find("#currency_switcher_default").val());var e=a('<span class="spinner" style="visibility: visible;">');b.find("#wcml_curr_sel_preview_wrap").append(e);var f={};b.find("input.js-wcml-cs-colorpicker").each(function(){f[a(this).attr("name")]=a(this).val()});var g=b.find("#wcml_currencies_switcher_id").val(),h=b.find("#currency_switcher_style").val();a.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"wcml_currencies_switcher_preview",wcml_nonce:b.find("#wcml_currencies_switcher_preview_nonce").val(),switcher_id:g,switcher_style:h,template:d,color_scheme:f},success:function(d){0==a("#"+d.inline_styles_id).length?a("head").append('<style type="text/css" id="'+d.inline_styles_id+'">'+d.inline_css+"</style>"):a("#"+d.inline_styles_id).html(d.inline_css),e.remove(),c?("new_widget"==g&&(g=b.find("#wcml-cs-widget").val()),a(".wcml-currency-preview."+g).html(d.preview)):b.find(".wcml-currency-preview").html(d.preview),"wcml-dropdown-click"==h&&WCMLCurrecnySwitcherDropdownClick.init()}})},500),set_currency_switcher_color_pre_set:function(){var b=a(this).val(),c=a(this).closest(".wcml-ui-dialog");if("undefined"!=settings.pre_selected_colors[b]){var d,e=settings.pre_selected_colors[b];for(d in e)a('.wcml-ui-dialog input[name="'+d+'"]').val(e[d]),a('.wcml-ui-dialog input[name="'+d+'"]').closest(".wp-picker-container").find(".wp-color-result").css("background-color",e[d])}WCML_Currency_Switcher_Settings.currency_switcher_preview(c)},update_currency_switcher_style:function(b){var c=a(this).closest(".wcml-ui-dialog");WCML_Currency_Switcher_Settings.currency_switcher_preview(c)},setup_currency_switcher_template_keyup:function(b){var c=a(this).closest(".wcml-ui-dialog");discard=!0,a(this).closest(".wcml-section").find(".button-wrap input").css("border-color","#1e8cbe"),WCML_Currency_Switcher_Settings.currency_switcher_preview(c)},setup_currency_switcher_template_change:function(b){a(this).val()||a(this).val(a("#currency_switcher_default").val())},open_dialog_from_hash:function(){var b=window.location.hash.substring(1).split("/"),c=b[0]||"",d=b[1]||"";"currency-switcher"==c&&(a('.edit_currency_switcher[data-switcher="'+d+'"]').trigger("click"),parent.location.hash="")}},WCML_Currency_Switcher_Settings.init()});
1
+ jQuery(function(a){WCML_Currency_Switcher_Settings={_currency_languages_saving:0,init:function(){a(document).ready(function(){a(document).on("change","#currency_switcher_style",WCML_Currency_Switcher_Settings.update_currency_switcher_style),a(document).on("click",".currency_switcher_save",WCML_Currency_Switcher_Settings.save_currency_switcher_settings),a(document).on("click",".delete_currency_switcher",WCML_Currency_Switcher_Settings.delete_currency_switcher),a(document).on("change",".js-wcml-cs-colorpicker-preset",WCML_Currency_Switcher_Settings.set_currency_switcher_color_pre_set),a(document).on("keyup",'input[name="wcml_curr_template"]',WCML_Currency_Switcher_Settings.setup_currency_switcher_template_keyup),a(document).on("change",'input[name="wcml_curr_template"]',WCML_Currency_Switcher_Settings.setup_currency_switcher_template_change),WCML_Currency_Switcher_Settings.open_dialog_from_hash()})},initColorPicker:function(){a(".wcml-ui-dialog .js-wcml-cs-panel-colors").find(".js-wcml-cs-colorpicker").wpColorPicker({change:function(b){var c=a(this).closest(".wcml-ui-dialog");WCML_Currency_Switcher_Settings.currency_switcher_preview(c)},clear:function(b){var c=a(this).closest(".wcml-ui-dialog");WCML_Currency_Switcher_Settings.currency_switcher_preview(c)}})},save_currency_switcher_settings:function(){var b=a(this).closest(".wcml-ui-dialog"),c=a('<span class="spinner" style="visibility: visible;"></span>'),d=b.find("#wcml-cs-widget option:selected").text(),e=b.find("#wcml_currencies_switcher_id").val(),f=b.find("#wcml-cs-widget").val(),g=b.find('input[name="wcml_cs_widget_title"]').val(),h=b.find("#currency_switcher_style").val();c.show(),a(this).parent().append(c),b.find(":submit,:button").prop("disabled",!0);var i=b.find('input[name="wcml_curr_template"]').val();i||(i=b.find("#currency_switcher_default").val());var j={};return b.find("input.js-wcml-cs-colorpicker").each(function(){j[a(this).attr("name")]=a(this).val()}),a.ajax({type:"POST",dataType:"json",url:ajaxurl,data:{action:"wcml_currencies_switcher_save_settings",wcml_nonce:b.find("#wcml_currencies_switcher_save_settings_nonce").val(),switcher_id:e,widget_id:f,widget_title:g,switcher_style:h,template:i,color_scheme:j},success:function(g){if(b.find(".ui-dialog-titlebar-close").trigger("click"),void 0===f&&(f=e),a("#wcml_currency_switcher_options_form_new_widget #wcml-cs-widget option").each(function(){a(this).val()==f&&a(this).remove()}),0==a("#wcml_currency_switcher_options_form_new_widget #wcml-cs-widget option").length&&a(".wcml_add_cs_sidebar").fadeOut(),a("#currency-switcher-widget .wcml-cs-list").find("thead tr").is(":hidden")&&a("#currency-switcher-widget .wcml-cs-list").find("thead tr").fadeIn(),0==a(".wcml-currency-preview."+f).length){var h=a(".wcml-cs-empty-row").clone();h.removeClass("wcml-cs-empty-row"),h.find(".wcml-currency-preview").addClass(f),h.find(".wcml-cs-widget-name").html(d),h.find(".edit_currency_switcher").attr("data-switcher",f),h.find(".edit_currency_switcher").attr("data-dialog","wcml_currency_switcher_options_"+f),h.find(".edit_currency_switcher").attr("data-content","wcml_currency_switcher_options_"+f),h.find(".delete_currency_switcher").attr("data-switcher",f),h.show(),a(".wcml-cs-list").find("tr.wcml-cs-empty-row").before(h),a(".wcml-cs-list").is(":hidden")&&a(".wcml-cs-list").fadeIn()}a("#wcml_currency_switcher_options_"+f).remove(),b.find(".wcml-dialog-container").attr("id","wcml-dialog-wcml_currency_switcher_options_"+f),b.find(":submit,:button").prop("disabled",!1),b.find("#wcml_currencies_switcher_id").val(f),c.remove(),WCML_Currency_Switcher_Settings.currency_switcher_preview(b,!0)}}),!1},delete_currency_switcher:function(b){b.preventDefault();var c=a(this).data("switcher"),d=a(this).closest("tr"),e=a('<span class="spinner" style="visibility: visible;">');a(this).parent().html(e),a.ajax({type:"POST",dataType:"json",url:ajaxurl,data:{action:"wcml_delete_currency_switcher",wcml_nonce:a("#wcml_delete_currency_switcher_nonce").val(),switcher_id:c},success:function(b){var e=d.find(".wcml-cs-widget-name").html();a("#wcml_currency_switcher_options_form_new_widget #wcml-cs-widget").append('<option value="'+c+'">'+e+"</option>"),d.remove(),1==a("#currency-switcher-widget .wcml-cs-list").find("tbody tr").length&&a("#currency-switcher-widget .wcml-cs-list").find("thead tr").fadeOut(),a(".wcml_add_cs_sidebar").is(":hidden")&&a(".wcml_add_cs_sidebar").fadeIn()}})},currency_switcher_preview:_.debounce(function(b,c){var d=b.find('input[name="wcml_curr_template"]').val();d||(d=b.find("#currency_switcher_default").val());var e=a('<span class="spinner" style="visibility: visible;">');b.find("#wcml_curr_sel_preview_wrap").append(e);var f={};b.find("input.js-wcml-cs-colorpicker").each(function(){f[a(this).attr("name")]=a(this).val()});var g=b.find("#wcml_currencies_switcher_id").val(),h=b.find("#currency_switcher_style").val();a.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"wcml_currencies_switcher_preview",wcml_nonce:b.find("#wcml_currencies_switcher_preview_nonce").val(),switcher_id:g,switcher_style:h,template:d,color_scheme:f},success:function(d){d.success&&(d=d.data,0==a("#"+d.inline_styles_id).length?a("head").append('<style type="text/css" id="'+d.inline_styles_id+'">'+d.inline_css+"</style>"):a("#"+d.inline_styles_id).html(d.inline_css),e.remove(),c?("new_widget"==g&&(g=b.find("#wcml-cs-widget").val()),a(".wcml-currency-preview."+g).html(d.preview)):b.find(".wcml-currency-preview").html(d.preview),"wcml-dropdown-click"==h&&WCMLCurrecnySwitcherDropdownClick.init())}})},500),set_currency_switcher_color_pre_set:function(){var b=a(this).val(),c=a(this).closest(".wcml-ui-dialog");if("undefined"!=settings.pre_selected_colors[b]){var d,e=settings.pre_selected_colors[b];for(d in e)a('.wcml-ui-dialog input[name="'+d+'"]').val(e[d]),a('.wcml-ui-dialog input[name="'+d+'"]').closest(".wp-picker-container").find(".wp-color-result").css("background-color",e[d])}WCML_Currency_Switcher_Settings.currency_switcher_preview(c)},update_currency_switcher_style:function(b){var c=a(this).closest(".wcml-ui-dialog");WCML_Currency_Switcher_Settings.currency_switcher_preview(c)},setup_currency_switcher_template_keyup:function(b){var c=a(this).closest(".wcml-ui-dialog");discard=!0,a(this).closest(".wcml-section").find(".button-wrap input").css("border-color","#1e8cbe"),WCML_Currency_Switcher_Settings.currency_switcher_preview(c)},setup_currency_switcher_template_change:function(b){a(this).val()||a(this).val(a("#currency_switcher_default").val())},open_dialog_from_hash:function(){var b=window.location.hash.substring(1).split("/"),c=b[0]||"",d=b[1]||"";"currency-switcher"==c&&(a('.edit_currency_switcher[data-switcher="'+d+'"]').trigger("click"),parent.location.hash="")}},WCML_Currency_Switcher_Settings.init()});
res/js/dialogs.min.js CHANGED
@@ -1 +1 @@
1
- var WCML_Dialog=WCML_Dialog||{};jQuery(function(a){var b;WCML_Dialog.dialog=function(c,d){var e=this;"undefined"==typeof c&&(c="generic"),e.overflow_y=a("body").css("overflow-y"),a("body").css("overflow-y","hidden"),b=a("#wcml-dialog-"+c);var f=a("#"+c).attr("title");if("undefined"==typeof f&&(f="undefined"!=d.title?d.title:""),"undefined"==typeof d["class"]&&(d["class"]=""),"undefined"==typeof d.draggable&&(d.draggable=!1),!b.length){a(document.body).append(a('<div class="wcml-dialog-container" title="'+f+'" id="wcml-dialog-'+c+'" />')),b=a("#wcml-dialog-"+c);var g=a(window).height(),h={title:"",autoOpen:!1,show:!0,dialogClass:"wcml-ui-dialog otgs-ui-dialog "+d["class"],position:{my:"center",at:"center",of:window},modal:!0,width:"90%",height:.7*g,resizable:!1,draggable:d.draggable,beforeOpen:function(a){},beforeClose:function(a){},close:function(b){a("body").css("overflow-y",e.overflow_y)},create:function(a){},focus:function(a){},open:function(b){a("body").css("overflow","hidden"),WCML_Dialog._repositionDialog(),"wcml-cs-dialog"===d["class"]&&WCML_Dialog._attachDialogScrollEvent()},refresh:function(a){}};"undefined"!=typeof d.height&&"wcml-cs-dialog"!=d["class"]&&(h.height=Math.min(.7*g,d.height)),"undefined"!=typeof d.width&&"wcml-cs-dialog"!=d["class"]&&(h.width=d.width),WCML_Dialog.using_wpdialog?b.wpdialog(h):b.dialog(h)}var i=_.debounce(function(){WCML_Dialog._repositionDialog(),"wcml-cs-dialog"===d["class"]&&WCML_Dialog._attachDialogScrollEvent()},200);if(a(window).resize(i),WCML_Dialog.using_wpdialog?b.wpdialog("open"):b.dialog("open"),d.action){var j=a('<div class="spinner"></div>');j.css({display:"inline-block",visibility:"visible","float":"none"}),b.html(j),a.ajax({url:ajaxurl,type:"post",dataType:"json",data:d,success:function(a){b.html(a.html)}})}return d.content&&a("#"+d.content).length&&b.html(a("#"+d.content).html()),"undefined"!=typeof WCML_Tooltip&&WCML_Tooltip.init(),!1},WCML_Dialog._repositionDialog=function(){var c=a(window).height()-180;b.css("max-height",c),b.dialog("option","position",{my:"center",at:"center",of:window})},WCML_Dialog._attachDialogScrollEvent=function(){var a=b.find(".wcml-currency-preview-wrapper"),c=b.width()>900,d=a.height()+200<b.height();d=d||c&&a.height()<b.height(),d?b.on("scroll.preview",function(){b.find(".wcml-currency-preview-wrapper").css({position:"relative",top:b.scrollTop()})}):b.off("scroll.preview").find(".wcml-currency-preview-wrapper").css({position:"relative",top:0})},WCML_Dialog._register_open_handler=function(){a(document).on("click",".js-wcml-dialog-trigger",function(b){b.preventDefault();var c=!1;a(this).data("dialog")?c=a(this).data("dialog"):a(this).data("action")&&(c=a(this).data("action")),c&&(a(this).data("action")&&a(this).data("action",a(this).data("action").replace(/-/g,"_")),WCML_Dialog.dialog(c,a(this).data()))}),a(document).on("click",".js-wcml-cs-dialog-trigger",function(b){b.preventDefault();var c=!1;a(this).data("dialog")&&(c=a(this).data("dialog"));var d=a(this).data();d["class"]="wcml-cs-dialog",d.draggable=!0,c&&(WCML_Dialog.dialog(c,d),WCML_Currency_Switcher_Settings.initColorPicker(),WCML_Currency_Switcher_Settings.currency_switcher_preview(a("#wcml-dialog-"+c)))})},WCML_Dialog._register_close_handler=function(){a(document).on("click",".wcml-dialog-close-button",function(b){b.preventDefault(),"undefined"!=typeof tinyMCE&&tinyMCE.triggerSave(),a(".wcml-dialog").find(".mce_editor textarea").each(function(){var b=a(this).attr("id"),c=a(this);if(b in tinyMCE.editors){var d=tinyMCE.get(b);d.isHidden()||c.val(d.getContent())}});var c=a(this).closest(".wcml-dialog-container"),d=a(this);d.attr("disabled","disabled");var e=a(this).data();if(e.action){var f=a('<div class="spinner"></div>');f.css({visibility:"visible","float":"right"}).prependTo(a(".wcml-dialog-footer .alignright")),a.ajax({url:ajaxurl,type:"post",dataType:"json",data:{action:e.action,fields:d.closest(".wcml-dialog-container").find("form").serialize(),icl_nonce:e.nonce},async:!1,success:function(a){e.stay&&(f.remove(),d.removeAttr("disabled"))}})}e.stay||(d.trigger("before_close_dialog"),WCML_Dialog.using_wpdialog?c.wpdialog("close"):c.dialog("close"))})},WCML_Dialog.init=function(){a(document).ready(function(){"undefined"!=typeof a.wp?WCML_Dialog.using_wpdialog="undefined"!=typeof a.wp.wpdialog:WCML_Dialog.using_wpdialog=!1,WCML_Dialog._register_open_handler(),WCML_Dialog._register_close_handler()})},WCML_Dialog.init()});
1
+ var WCML_Dialog=WCML_Dialog||{};jQuery(function(a){var b;WCML_Dialog.dialog=function(c,d){var e=this;void 0===c&&(c="generic"),e.overflow_y=a("body").css("overflow-y"),a("body").css("overflow-y","hidden"),b=a("#wcml-dialog-"+c);var f=a("#"+c).attr("title");if(void 0===f&&(f="undefined"!=d.title?d.title:""),void 0===d.class&&(d.class=""),void 0===d.draggable&&(d.draggable=!1),!b.length){a(document.body).append(a('<div class="wcml-dialog-container" title="'+f+'" id="wcml-dialog-'+c+'" />')),b=a("#wcml-dialog-"+c);var g=a(window).height(),h={title:"",autoOpen:!1,show:!0,dialogClass:"wcml-ui-dialog otgs-ui-dialog "+d.class,position:{my:"center",at:"center",of:window},modal:!0,width:"90%",height:.7*g,resizable:!1,draggable:d.draggable,beforeOpen:function(a){},beforeClose:function(a){},close:function(b){a("body").css("overflow-y",e.overflow_y)},create:function(a){},focus:function(a){},open:function(b){a("body").css("overflow","hidden"),WCML_Dialog._repositionDialog(),"wcml-cs-dialog"===d.class&&WCML_Dialog._attachDialogScrollEvent()},refresh:function(a){}};void 0!==d.height&&"wcml-cs-dialog"!=d.class&&(h.height=Math.min(.7*g,d.height)),void 0!==d.width&&"wcml-cs-dialog"!=d.class&&(h.width=d.width),WCML_Dialog.using_wpdialog?b.wpdialog(h):b.dialog(h)}var i=_.debounce(function(){WCML_Dialog._repositionDialog(),"wcml-cs-dialog"===d.class&&WCML_Dialog._attachDialogScrollEvent()},200);if(a(window).resize(i),WCML_Dialog.using_wpdialog?b.wpdialog("open"):b.dialog("open"),d.action){var j=a('<div class="spinner"></div>');j.css({display:"inline-block",visibility:"visible",float:"none"}),b.html(j),a.ajax({url:ajaxurl,type:"post",dataType:"json",data:d,success:function(a){b.html(a.html)}})}return d.content&&a("#"+d.content).length&&b.html(a("#"+d.content).html()),"undefined"!=typeof WCML_Tooltip&&WCML_Tooltip.init(),!1},WCML_Dialog._repositionDialog=function(){var c=a(window).height()-180;b.css("max-height",c),b.dialog("option","position",{my:"center",at:"center",of:window})},WCML_Dialog._attachDialogScrollEvent=function(){var a=b.find(".wcml-currency-preview-wrapper"),c=b.width()>900,d=a.height()+200<b.height();d=d||c&&a.height()<b.height(),d?b.on("scroll.preview",function(){b.find(".wcml-currency-preview-wrapper").css({position:"relative",top:b.scrollTop()})}):b.off("scroll.preview").find(".wcml-currency-preview-wrapper").css({position:"relative",top:0})},WCML_Dialog._register_open_handler=function(){a(document).on("click",".js-wcml-dialog-trigger",function(b){b.preventDefault();var c=!1;a(this).data("dialog")?c=a(this).data("dialog"):a(this).data("action")&&(c=a(this).data("action")),c&&(a(this).data("action")&&a(this).data("action",a(this).data("action").replace(/-/g,"_")),WCML_Dialog.dialog(c,a(this).data()))}),a(document).on("click",".js-wcml-cs-dialog-trigger",function(b){b.preventDefault();var c=!1;a(this).data("dialog")&&(c=a(this).data("dialog"));var d=a(this).data();d.class="wcml-cs-dialog",d.draggable=!0,c&&(WCML_Dialog.dialog(c,d),WCML_Currency_Switcher_Settings.initColorPicker(),WCML_Currency_Switcher_Settings.currency_switcher_preview(a("#wcml-dialog-"+c)))})},WCML_Dialog._register_close_handler=function(){a(document).on("click",".wcml-dialog-close-button",function(b){b.preventDefault(),"undefined"!=typeof tinyMCE&&tinyMCE.triggerSave(),a(".wcml-dialog").find(".mce_editor textarea").each(function(){var b=a(this).attr("id"),c=a(this);if(b in tinyMCE.editors){var d=tinyMCE.get(b);d.isHidden()||c.val(d.getContent())}});var c=a(this).closest(".wcml-dialog-container"),d=a(this);d.attr("disabled","disabled");var e=a(this).data();if(e.action){var f=a('<div class="spinner"></div>');f.css({visibility:"visible",float:"right"}).prependTo(a(".wcml-dialog-footer .alignright")),a.ajax({url:ajaxurl,type:"post",dataType:"json",data:{action:e.action,fields:d.closest(".wcml-dialog-container").find("form").serialize(),icl_nonce:e.nonce},async:!1,success:function(a){e.stay&&(f.remove(),d.removeAttr("disabled"))}})}e.stay||(d.trigger("before_close_dialog"),WCML_Dialog.using_wpdialog?c.wpdialog("close"):c.dialog("close"))})},WCML_Dialog.init=function(){a(document).ready(function(){void 0!==a.wp?WCML_Dialog.using_wpdialog=void 0!==a.wp.wpdialog:WCML_Dialog.using_wpdialog=!1,WCML_Dialog._register_open_handler(),WCML_Dialog._register_close_handler()})},WCML_Dialog.init()});
res/js/jquery.cookie.min.js CHANGED
@@ -1 +1 @@
1
- !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(a){return a}function c(a){return decodeURIComponent(a.replace(e," "))}function d(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return f.json?JSON.parse(a):a}catch(b){}}var e=/\+/g,f=a.cookie=function(e,g,h){if(void 0!==g){if(h=a.extend({},f.defaults,h),"number"==typeof h.expires){var i=h.expires,j=h.expires=new Date;j.setDate(j.getDate()+i)}return g=f.json?JSON.stringify(g):String(g),document.cookie=[f.raw?e:encodeURIComponent(e),"=",f.raw?g:encodeURIComponent(g),h.expires?"; expires="+h.expires.toUTCString():"",h.path?"; path="+h.path:"",h.domain?"; domain="+h.domain:"",h.secure?"; secure":""].join("")}for(var k=f.raw?b:c,l=document.cookie.split("; "),m=e?void 0:{},n=0,o=l.length;o>n;n++){var p=l[n].split("="),q=k(p.shift()),r=k(p.join("="));if(e&&e===q){m=d(r);break}e||(m[q]=d(r))}return m};f.defaults={},a.removeCookie=function(b,c){return void 0!==a.cookie(b)?(a.cookie(b,"",a.extend({},c,{expires:-1})),!0):!1}});
1
+ !function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){function b(a){return a}function c(a){return decodeURIComponent(a.replace(e," "))}function d(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return f.json?JSON.parse(a):a}catch(a){}}var e=/\+/g,f=a.cookie=function(e,g,h){if(void 0!==g){if(h=a.extend({},f.defaults,h),"number"==typeof h.expires){var i=h.expires,j=h.expires=new Date;j.setDate(j.getDate()+i)}return g=f.json?JSON.stringify(g):String(g),document.cookie=[f.raw?e:encodeURIComponent(e),"=",f.raw?g:encodeURIComponent(g),h.expires?"; expires="+h.expires.toUTCString():"",h.path?"; path="+h.path:"",h.domain?"; domain="+h.domain:"",h.secure?"; secure":""].join("")}for(var k=f.raw?b:c,l=document.cookie.split("; "),m=e?void 0:{},n=0,o=l.length;n<o;n++){var p=l[n].split("="),q=k(p.shift()),r=k(p.join("="));if(e&&e===q){m=d(r);break}e||(m[q]=d(r))}return m};f.defaults={},a.removeCookie=function(b,c){return void 0!==a.cookie(b)&&(a.cookie(b,"",a.extend({},c,{expires:-1})),!0)}});
res/js/languages_notice.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(){jQuery(document).on("click","#wcml_translations_message",function(a){a.preventDefault(),jQuery.ajax({type:"post",url:ajaxurl,data:{action:"hide_wcml_translations_message",wcml_nonce:jQuery("#wcml_hide_languages_notice").val()},success:function(a){jQuery("#wcml_translations_message").remove()}})}),jQuery(document).on("click","#icl_save_language_selection",function(){jQuery("#icl_avail_languages_picker li input").each(function(){return jQuery(this).is(":checked")?(jQuery('<p class="icl_ajx_response" style="display: block">'+wcml_settings.warn+"</p>").insertBefore("#icl_ajx_response"),!1):void 0})})});
1
+ jQuery(document).ready(function(){jQuery(document).on("click","#wcml_translations_message",function(a){a.preventDefault(),jQuery.ajax({type:"post",url:ajaxurl,data:{action:"hide_wcml_translations_message",wcml_nonce:jQuery("#wcml_hide_languages_notice").val()},success:function(a){jQuery("#wcml_translations_message").remove()}})}),jQuery(document).on("click","#icl_save_language_selection",function(){jQuery("#icl_avail_languages_picker li input").each(function(){if(jQuery(this).is(":checked"))return jQuery('<p class="icl_ajx_response" style="display: block">'+wcml_settings.warn+"</p>").insertBefore("#icl_ajx_response"),!1})})});
res/js/lock_fields.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){var b,c=["_virtual","_downloadable","product-type","_backorders","_manage_stock","_stock","_stock_status","_sold_individually","comment_status","_tax_status","_tax_class","parent_id","crosssell_ids","upsell_ids","product_shipping_class"];for(1==unlock_fields.file_paths&&c.push("_download_type"),c=c.concat(non_standard_fields.ids),a(".wcml_prod_hidden_notice").prependTo("#woocommerce-product-data"),b=0;b<c.length;b++)a("#"+c[b]).attr("disabled","disabled"),a("#"+c[b]).after(a(".wcml_lock_img").clone().removeClass("wcml_lock_img").show());var d=["add_variation","link_all_variations","attribute_taxonomy","save_attributes","add_new_attribute","product_attributes .remove_row","add_attribute","select_all_attributes","select_no_attributes","edit-visibility"];for(d=d.concat(non_standard_fields.classes),1==unlock_fields.file_paths&&(d.push("upload_file_button"),d.push("insert"),d.push("delete"),a(".upload_file_button,.insert,.delete").bind({click:function(a){return!1}})),b=0;b<d.length;b++)a("."+d[b]).attr("disabled","disabled"),a("."+d[b]).after(a(".wcml_lock_img").clone().removeClass("wcml_lock_img").show());a("#visibility .edit-visibility span").bind({click:function(a){return!1}}),a(".remove_variation").each(function(){a(this).attr("disabled","disabled"),a(this).after(a(".wcml_lock_img").clone().removeClass("wcml_lock_img").show().css("float","right"))});var e=["_width","_height","_sku","_length","_weight","product_length","_regular_price","_sale_price","_sale_price_dates_from","_sale_price_dates_to"];for(1==unlock_fields.file_paths&&(e.push("_download_limit"),e.push("_download_expiry"),e.push("_wc_file_names[]"),e.push("_wc_file_urls[]")),e=e.concat(non_standard_fields.input_names),1==unlock_fields.menu_order&&e.push("menu_order"),b=0;b<e.length;b++)a('input[name="'+e[b]+'"]').attr("readonly","readonly"),a(".dimensions_field span.wrap").css("float","left"),("_width"==e[b]||"_height"==e[b]||"_length"==e[b])&&(a('input[name="'+e[b]+'"]').css("margin-right",0),a('input[name="'+e[b]+'"]').css("float","none"),a('input[name="'+e[b]+'"]').css("width","29%")),"_sale_price_dates_to"==e[b]?a('input[name="'+e[b]+'"]').after(a(".wcml_lock_img").clone().removeClass("wcml_lock_img").css("float","left").show()):a('input[name="'+e[b]+'"]').after(a(".wcml_lock_img").clone().removeClass("wcml_lock_img").show());a('#product_attributes td textarea,#product_attributes input[type="text"]').each(function(){a(this).attr("readonly","readonly"),a(this).after(a(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())}),a('#product_attributes input[type="checkbox"]').each(function(){a(this).attr("disabled","disabled"),a(this).after(a(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())}),a('form#post input[type="submit"]').click(function(){for(b=0;b<c.length;b++)a("#"+c[b]).removeAttr("disabled");a('.woocommerce_variation select,#variable_product_options .toolbar select,.woocommerce_variation input[type="checkbox"],#product_attributes input[type="checkbox"]').each(function(){a(this).removeAttr("disabled")})})});var wcml_lock_variation_fields=function(a){var b=jQuery(".woocommerce_variation>h3 select").attr("disabled");if("undefined"==typeof b||b===!1){jQuery(".woocommerce_variation>h3 select, #variable_product_options .toolbar select, .show_if_variation_manage_stock select").each(function(){jQuery(this).attr("disabled","disabled"),jQuery(this).parent().append('<input type="hidden" name="'+jQuery(this).attr("name")+'" value="'+jQuery(this).val()+'" />'),jQuery(this).after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())});var c=0,d=["_width","_height","_sku","_length","_weight","product_length","_regular_price","_sale_price","_sale_price_dates_from","_sale_price_dates_to","_stock","_download_limit","_download_expiry"];for(c=0;c<d.length;c++)jQuery('input[name^="variable'+d[c]+'"]').each(function(){jQuery(this).attr("readonly","readonly"),jQuery(this).after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())});var e=["_enabled","_is_downloadable","_is_virtual","_manage_stock"];for(c=0;c<e.length;c++)jQuery('input[name^="variable'+e[c]+'"]').each(function(){jQuery(this).attr("disabled","disabled"),jQuery(this).parent().append('<input type="hidden" name="'+jQuery(this).attr("name")+'" value="'+jQuery(this).val()+'" />'),jQuery(this).after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())});var f=["_stock_status","_shipping_class","_tax_class"];for(c=0;c<f.length;c++)jQuery('select[name^="variable'+f[c]+'"]').each(function(){jQuery(this).attr("disabled","disabled"),jQuery(this).parent().append('<input type="hidden" name="'+jQuery(this).attr("name")+'" value="'+jQuery(this).val()+'" />'),jQuery(this).after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())});if(a)for(var g in a)1==a[g]&&(jQuery('input[name^="_wc_variation_file_names['+g+']"]').each(function(){jQuery(this).attr("readonly","readonly")}),jQuery('input[name^="_wc_variation_file_urls['+g+']"]').each(function(){jQuery(this).attr("readonly","readonly"),jQuery(this).closest("tr").find(".upload_file_button").attr("disabled","disabled"),jQuery(this).closest("tr").find(".delete").attr("disabled","disabled"),jQuery(this).closest("tr").find(".delete").after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show().css("float","right"))}),jQuery('input[name^="_wc_variation_file_urls['+g+']"]').closest("table").find(".insert").attr("disabled","disabled"),jQuery('input[name^="_wc_variation_file_urls['+g+']"]').closest("table").find(".insert").after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show().css("float","left")))}};
1
+ jQuery(document).ready(function(a){var b,c=["_virtual","_downloadable","product-type","_backorders","_manage_stock","_stock","_stock_status","_sold_individually","comment_status","_tax_status","_tax_class","parent_id","crosssell_ids","upsell_ids","product_shipping_class"];for(1==unlock_fields.file_paths&&c.push("_download_type"),c=c.concat(non_standard_fields.ids),a(".wcml_prod_hidden_notice").prependTo("#woocommerce-product-data"),b=0;b<c.length;b++)a("#"+c[b]).attr("disabled","disabled"),a("#"+c[b]).after(a(".wcml_lock_img").clone().removeClass("wcml_lock_img").show());var d=["add_variation","link_all_variations","attribute_taxonomy","save_attributes","add_new_attribute","product_attributes .remove_row","add_attribute","select_all_attributes","select_no_attributes","edit-visibility"];for(d=d.concat(non_standard_fields.classes),1==unlock_fields.file_paths&&(d.push("upload_file_button"),d.push("insert"),d.push("delete"),a(".upload_file_button,.insert,.delete").bind({click:function(a){return!1}})),b=0;b<d.length;b++)a("."+d[b]).attr("disabled","disabled"),a("."+d[b]).after(a(".wcml_lock_img").clone().removeClass("wcml_lock_img").show());a("#visibility .edit-visibility span").bind({click:function(a){return!1}}),a(".remove_variation").each(function(){a(this).attr("disabled","disabled"),a(this).after(a(".wcml_lock_img").clone().removeClass("wcml_lock_img").show().css("float","right"))});var e=["_width","_height","_sku","_length","_weight","product_length","_regular_price","_sale_price","_sale_price_dates_from","_sale_price_dates_to"];for(1==unlock_fields.file_paths&&(e.push("_download_limit"),e.push("_download_expiry"),e.push("_wc_file_names[]"),e.push("_wc_file_urls[]")),e=e.concat(non_standard_fields.input_names),1==unlock_fields.menu_order&&e.push("menu_order"),b=0;b<e.length;b++)a('input[name="'+e[b]+'"]').attr("readonly","readonly"),a(".dimensions_field span.wrap").css("float","left"),"_width"!=e[b]&&"_height"!=e[b]&&"_length"!=e[b]||(a('input[name="'+e[b]+'"]').css("margin-right",0),a('input[name="'+e[b]+'"]').css("float","none"),a('input[name="'+e[b]+'"]').css("width","29%")),"_sale_price_dates_to"==e[b]?a('input[name="'+e[b]+'"]').after(a(".wcml_lock_img").clone().removeClass("wcml_lock_img").css("float","left").show()):a('input[name="'+e[b]+'"]').after(a(".wcml_lock_img").clone().removeClass("wcml_lock_img").show());a('#product_attributes td textarea,#product_attributes input[type="text"]').each(function(){a(this).attr("readonly","readonly"),a(this).after(a(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())}),a('#product_attributes input[type="checkbox"]').each(function(){a(this).attr("disabled","disabled"),a(this).after(a(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())}),a('form#post input[type="submit"]').click(function(){for(b=0;b<c.length;b++)a("#"+c[b]).removeAttr("disabled");a('.woocommerce_variation select,#variable_product_options .toolbar select,.woocommerce_variation input[type="checkbox"],#product_attributes input[type="checkbox"]').each(function(){a(this).removeAttr("disabled")})})});var wcml_lock_variation_fields=function(a){var b=jQuery(".woocommerce_variation>h3 select").attr("disabled");if(void 0===b||b===!1){jQuery(".woocommerce_variation>h3 select, #variable_product_options .toolbar select, .show_if_variation_manage_stock select").each(function(){jQuery(this).attr("disabled","disabled"),jQuery(this).parent().append('<input type="hidden" name="'+jQuery(this).attr("name")+'" value="'+jQuery(this).val()+'" />'),jQuery(this).after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())});var c=0,d=["_width","_height","_sku","_length","_weight","product_length","_regular_price","_sale_price","_sale_price_dates_from","_sale_price_dates_to","_stock","_download_limit","_download_expiry"];for(c=0;c<d.length;c++)jQuery('input[name^="variable'+d[c]+'"]').each(function(){jQuery(this).attr("readonly","readonly"),jQuery(this).after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())});var e=["_enabled","_is_downloadable","_is_virtual","_manage_stock"];for(c=0;c<e.length;c++)jQuery('input[name^="variable'+e[c]+'"]').each(function(){jQuery(this).attr("disabled","disabled"),jQuery(this).parent().append('<input type="hidden" name="'+jQuery(this).attr("name")+'" value="'+jQuery(this).val()+'" />'),jQuery(this).after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())});var f=["_stock_status","_shipping_class","_tax_class"];for(c=0;c<f.length;c++)jQuery('select[name^="variable'+f[c]+'"]').each(function(){jQuery(this).attr("disabled","disabled"),jQuery(this).parent().append('<input type="hidden" name="'+jQuery(this).attr("name")+'" value="'+jQuery(this).val()+'" />'),jQuery(this).after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show())});if(a)for(var g in a)1==a[g]&&(jQuery('input[name^="_wc_variation_file_names['+g+']"]').each(function(){jQuery(this).attr("readonly","readonly")}),jQuery('input[name^="_wc_variation_file_urls['+g+']"]').each(function(){jQuery(this).attr("readonly","readonly"),jQuery(this).closest("tr").find(".upload_file_button").attr("disabled","disabled"),jQuery(this).closest("tr").find(".delete").attr("disabled","disabled"),jQuery(this).closest("tr").find(".delete").after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show().css("float","right"))}),jQuery('input[name^="_wc_variation_file_urls['+g+']"]').closest("table").find(".insert").attr("disabled","disabled"),jQuery('input[name^="_wc_variation_file_urls['+g+']"]').closest("table").find(".insert").after(jQuery(".wcml_lock_img").clone().removeClass("wcml_lock_img").show().css("float","left")))}};
res/js/multi-currency.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){WCML_Multi_Currency={_currency_languages_saving:0,init:function(){a(document).ready(function(){WCML_Multi_Currency.setup_multi_currency_toggle(),a(document).on("change",".currency_code select",WCML_Multi_Currency.select_currency),a(document).on("click",".delete_currency",WCML_Multi_Currency.delete_currency),a(document).on("click",".wcml_currency_options .currency_options_save",WCML_Multi_Currency.save_currency),a(document).on("click",".js-display-tooltip",WCML_Multi_Currency.tooltip),a(document).on("click",".currency_languages a.otgs-ico-no",WCML_Multi_Currency.enable_currency_for_language),a(document).on("click",".currency_languages a.otgs-ico-yes",WCML_Multi_Currency.disable_currency_for_language),a(document).on("change",".default_currency select",WCML_Multi_Currency.change_default_currency),WCML_Multi_Currency.setup_currencies_sorting(),a(document).on("change",".currency_option_position",WCML_Multi_Currency.price_preview),a(document).on("change",".currency_option_thousand_sep",WCML_Multi_Currency.price_preview),a(document).on("change",".currency_option_decimal_sep",WCML_Multi_Currency.price_preview),a(document).on("change",".currency_option_decimals",WCML_Multi_Currency.price_preview),a(document).on("change",".currency_code select",WCML_Multi_Currency.price_preview),a(document).on("keyup",".wcml-exchange-rate",WCML_Multi_Currency.exchange_rate_check),a("#wcml_mc_options").length&&(WCML_Multi_Currency.wcml_mc_form_submitted=!1,WCML_Multi_Currency.read_form_fields_status(),window.onbeforeunload=function(b){return!WCML_Multi_Currency.wcml_mc_form_submitted&&WCML_Multi_Currency.form_fields_changed()||WCML_Multi_Currency.is_update_currency_lang_in_progress()?a("#wcml_warn_message").val():void 0},a("#wcml_mc_options").on("submit",function(){WCML_Multi_Currency.wcml_mc_form_submitted=!0}))})},setup_multi_currency_toggle:function(){a("#multi_currency_independent").change(function(){"checked"==a(this).attr("checked")?a("#currency-switcher, #currency-switcher-widget, #currency-switcher-product, #multi-currency-per-language-details, #online-exchange-rates").fadeIn():a("#currency-switcher, #currency-switcher-widget, #currency-switcher-product, #multi-currency-per-language-details, #online-exchange-rates").fadeOut()})},select_currency:function(){var b=a(this).closest(".wcml_currency_options"),c=b.find(".wcml-dialog-close-button");c.attr("data-currency",a(this).val()),c.attr("data-symbol",a(this).find("option:selected").attr("data-symbol")),b.find(".this-currency").html(a(this).val())},delete_currency:function(b){b.preventDefault();var c=!1,d=a(this).data("currency"),e=a(this).data("currency_name"),f=a(this).data("currency_symbol");if(a(".currency_lang_table .wcml-row-currency-lang:first .currency_languages").each(function(){return WCML_Multi_Currency.check_currency_language(a(this).find("li").data("lang"),d)?void 0:(c=!0,!1)}),!c){a("#currency_row_"+d+" .currency_action_update").hide();var g=a('<span class="spinner" style="visibility: visible;margin:0;">');return a(this).hide(),a(this).parent().append(g).show(),a.ajax({type:"post",url:ajaxurl,data:{action:"wcml_delete_currency",wcml_nonce:a("#del_currency_nonce").val(),code:d},success:function(b){a("#currency_row_"+d).remove(),a("#currency_row_langs_"+d).remove(),a("#currency_row_del_"+d).remove(),a("#wcml_currencies_order .wcml_currencies_order_"+d).remove(),a("#wcml_currency_options_code_").prepend('<option data-symbol="'+f+'" value="'+d+'">'+e+"</option>"),a("#wcml_currency_options_code_").val(d).trigger("change"),a("#currency-lang-table").find("tr.default_currency select").each(function(){a(this).find("option[value='"+d+"']").remove()}),a(".wcml-ui-dialog").each(function(){WCML_Currency_Switcher_Settings.currency_switcher_preview(a(this))}),1==a(".wcml-row-currency").length&&(a("#online-exchange-rates-no-currencies").next().hide(),a("#online-exchange-rates-no-currencies").show())},done:function(){g.remove()}}),!1}},save_currency:function(){var b=a(this).closest(".wcml-dialog-container"),c=WCML_Multi_Currency.check_on_numeric(b,".currency_option_decimals"),d=WCML_Multi_Currency.check_on_numeric(b,".abstract_amount");if(c||d)return!1;a(".wcml-currency-options-dialog :submit, .wcml-currency-options-dialog :button").prop("disabled",!0);var e=b.find('[name="currency_options[code]"]').val(),f=a('<span class="spinner" style="visibility:visible;position:absolute;margin-left:10px;"></span>');return f.show(),a(this).parent().prepend(f),a.ajax({url:ajaxurl,type:"POST",dataType:"json",data:b.find('[name^="currency_options"]').serialize()+"&action=wcml_save_currency&wcml_nonce="+jQuery("#wcml_save_currency_nonce").val(),success:function(c){if(b.find(".wcml-dialog-close-button").trigger("click"),a(".wcml-ui-dialog").each(function(){WCML_Currency_Switcher_Settings.currency_switcher_preview(a(this))}),0==a("#currency_row_"+e).length){var d=a("#currency-table tr.wcml-row-currency:last").clone();d.attr("id","currency_row_"+e);var f=d.find(".wcml-col-edit a");f.attr("data-content","wcml_currency_options_"+e),f.attr("data-currency",e),f.data("dialog","wcml_currency_options_"+e),f.removeClass("hidden"),a("#currency-table").find("tr.default_currency").before(d);var d=a("#currency-lang-table tr.wcml-row-currency-lang:last").clone();d.attr("id","currency_row_langs_"+e),a("#currency-lang-table").find("tr.default_currency").before(d),d.find(".on a").each(function(){a(this).attr("data-currency",e)}),a("#currency-lang-table").find("tr.default_currency select").each(function(){a(this).append('<option value="'+e+'">'+e+"</option>")}),a("#wcml_currencies_order").append('<li class="wcml_currencies_order_'+e+' ui-sortable-handle" cur="'+e+'">'+c.currency_name_formatted+"</li>");var d=a("#currency-delete-table tr.wcml-row-currency-del:last").clone();d.attr("id","currency_row_del_"+e);var g=d.find(".delete_currency");g.removeClass("hidden"),g.attr("data-currency",e),g.attr("data-currency_name",c.currency_name),g.attr("data-currency_symbol",c.currency_symbol),a("#currency-delete-table").find("tr.default_currency").before(d)}a("#currency_row_"+e+" .wcml-col-currency").html(c.currency_name_formatted),a("#currency_row_"+e+" .wcml-col-rate").html(c.currency_meta_info),a("#wcml_currency_options_"+e).remove(),a("#wcml_mc_options").before(c.currency_options),a('#wcml_currency_options_code_ option[value="'+e+'"]').remove(),a("#online-exchange-rates-no-currencies").is(":visible")&&(a("#online-exchange-rates-no-currencies").hide(),a("#online-exchange-rates-no-currencies").next().show())}}),!1},check_on_numeric:function(b,c){var d=a('<span class="wcml-error">');return WCML_Multi_Currency.is_number(b.find(c).val())?(b.find(c).parent().find(".wcml-error").size()>0&&b.find(c).parent().find(".wcml-error").remove(),!1):(0==b.find(c).parent().find(".wcml-error").size()&&(b.find(c).parent().append(d),d.text(b.find(c).data("message"))),!0)},tooltip:function(){var b=a(this);a(".wp-pointer").fadeOut(100),a(this).pointer({content:"<h3>"+b.data("header")+"</h3><p>"+b.data("content")+"</p>",position:{edge:"left",align:"center",offset:"15 0"}}).pointer("open")},enable_currency_for_language:function(b){if(WCML_Multi_Currency.is_update_currency_lang_in_progress())return!1;b.preventDefault(),a(this).addClass("spinner").removeClass("otgs-ico-no").css("visibility","visible");a(this).closest("tr")[0].rowIndex;a('.default_currency select[rel="'+a(this).data("language")+'"]').append('<option value="'+a(this).data("currency")+'">'+a(this).data("currency")+"</option>"),WCML_Multi_Currency.update_currency_lang(a(this),1,0);var c=a(this).data("title-alt");a(this).data("title-alt",a(this).attr("title")),a(this).attr("title",c)},disable_currency_for_language:function(b){if(WCML_Multi_Currency.is_update_currency_lang_in_progress())return!1;b.preventDefault(),a(this).addClass("spinner").removeClass("otgs-ico-yes").css("visibility","visible");var c=a(this).data("language");if(!WCML_Multi_Currency.check_currency_language(c))return void a(this).removeClass("spinner").addClass("otgs-ico-yes");a(this).closest("tr")[0].rowIndex;a('.currency_languages select[rel="'+a(this).data("language")+'"]').val()==a(this).data("currency")?WCML_Multi_Currency.update_currency_lang(a(this),0,1):WCML_Multi_Currency.update_currency_lang(a(this),0,0),a('.default_currency select[rel="'+a(this).data("language")+'"] option[value="'+a(this).data("currency")+'"]').remove();var d=a(this).data("title-alt");a(this).data("title-alt",a(this).attr("title")),a(this).attr("title",d)},check_currency_language:function(b,c){var d=a('#currency-lang-table a.otgs-ico-yes[data-language="'+b+'"]');return c&&(d=a('#currency-lang-table a.otgs-ico-yes[data-language="'+b+'"]:not([data-currency="'+c+'"]')),0==d.length?(alert(a("#wcml_warn_disable_language_massage").val()),!1):!0},is_update_currency_lang_in_progress:function(){var a="undefined"!=typeof WCML_Multi_Currency._update_currency_lang_sync_flag&&1==WCML_Multi_Currency._update_currency_lang_sync_flag;return a},set_update_currency_lang_in_progress:function(a){WCML_Multi_Currency._update_currency_lang_sync_flag=a},update_currency_lang:function(b,c,d){WCML_Multi_Currency._currency_languages_saving++,a("#wcml_mc_options :submit").attr("disabled","disabled"),a('input[name="wcml_mc_options"]').attr("disabled","disabled");var e=b.data("language"),f=b.data("currency");discard=!0,WCML_Multi_Currency.set_update_currency_lang_in_progress(1),a.ajax({type:"post",url:ajaxurl,data:{action:"wcml_update_currency_lang",value:c,lang:e,code:f,wcml_nonce:a("#update_currency_lang_nonce").val()},success:function(){d&&WCML_Multi_Currency.update_default_currency(e,0)},complete:function(){a('input[name="wcml_mc_options"]').removeAttr("disabled"),discard=!1,b.removeClass("spinner").css("visibility","visible"),c?b.addClass("otgs-ico-yes"):b.addClass("otgs-ico-no"),WCML_Multi_Currency._currency_languages_saving--,0==WCML_Multi_Currency._currency_languages_saving&&a("#wcml_mc_options :submit").removeAttr("disabled"),WCML_Multi_Currency.set_update_currency_lang_in_progress(0)}})},change_default_currency:function(){WCML_Multi_Currency.update_default_currency(a(this).attr("rel"),a(this).val(),a(this))},update_default_currency:function(b,c,d){if(a("#wcml_mc_options_submit").attr("disabled","disabled"),d){var e=a('<span class="spinner" style="visibility: visible;float:none;position: absolute">');d.parent().append(e)}discard=!0,a.ajax({type:"post",url:ajaxurl,data:{action:"wcml_update_default_currency",lang:b,code:c,wcml_nonce:a("#wcml_update_default_currency_nonce").val()},complete:function(){discard=!1,a("#wcml_mc_options_submit").removeAttr("disabled"),d&&d.parent().find(".spinner").remove()}})},is_number:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},setup_currencies_sorting:function(){a("#wcml_currencies_order").sortable({update:function(){var b=[];a("#wcml_currencies_order").find("li").each(function(){b.push(a(this).attr("cur"))}),a.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"wcml_currencies_order",wcml_nonce:a("#wcml_currencies_order_order_nonce").val(),order:b.join(";")},success:function(b){fadeInAjxResp(".wcml_currencies_order_ajx_resp",b.message),a(".wcml-ui-dialog").each(function(){WCML_Currency_Switcher_Settings.currency_switcher_preview(a(this))})}})}})},price_preview:function(){var b=a(this).closest(".wcml_currency_options"),c=b.find(".currency_option_position").val(),d=b.find(".currency_option_thousand_sep").val(),d=b.find(".currency_option_thousand_sep").val(),e=b.find(".currency_option_decimal_sep").val(),f=a(this).closest(".wcml_currency_options").find(".wcml-dialog-close-button").attr("data-symbol"),g="56789".substr(0,b.find(".currency_option_decimals").val());""==g&&(e="");var h="";switch(c){case"left":h="{symbol}1{thousand_sep}234{decimal_sep}{decimals}";break;case"right":h="1{thousand_sep}234{decimal_sep}{decimals}{symbol}";break;case"left_space":h="{symbol}&nbsp;1{thousand_sep}234{decimal_sep}{decimals}";break;case"right_space":h="1{thousand_sep}234{decimal_sep}{decimals}&nbsp;{symbol}"}var i=h.replace(/\{symbol\}/,f).replace(/\{thousand_sep\}/,d).replace(/\{decimal_sep\}/,e).replace(/\{decimals\}/,g);return b.find(".wcml-co-preview-value").html(i),!1},read_form_fields_status:function(){this.mc_form_status=a("#wcml_mc_options").serialize()},form_fields_changed:function(){return this.mc_form_status!=a("#wcml_mc_options").serialize()},exchange_rate_check:function(b){if("undefined"==typeof c)var c={DOM_SUBTRACT:109,DOM_DASH:189,DOM_E:69};a(this).val()<=0||!WCML_Multi_Currency.is_number(a(this).val())||b.keyCode==c.DOM_SUBTRACT||b.keyCode==c.DOM_DASH||b.keyCode==c.DOM_E?(a(".wcml-co-set-rate .wcml-error").fadeIn(),a(".currency_options_save").attr("disabled","disabled")):(a(".wcml-co-set-rate .wcml-error").fadeOut(),a(".currency_options_save").removeAttr("disabled"))}},WCML_Multi_Currency.init()});
1
+ jQuery(function(a){WCML_Multi_Currency={_currency_languages_saving:0,init:function(){a(document).ready(function(){WCML_Multi_Currency.setup_multi_currency_toggle(),a(document).on("change",".currency_code select",WCML_Multi_Currency.select_currency),a(document).on("click",".delete_currency",WCML_Multi_Currency.delete_currency),a(document).on("click",".wcml_currency_options .currency_options_save",WCML_Multi_Currency.save_currency),a(document).on("click",".js-display-tooltip",WCML_Multi_Currency.tooltip),a(document).on("click",".currency_languages a.otgs-ico-no",WCML_Multi_Currency.enable_currency_for_language),a(document).on("click",".currency_languages a.otgs-ico-yes",WCML_Multi_Currency.disable_currency_for_language),a(document).on("change",".default_currency select",WCML_Multi_Currency.change_default_currency),WCML_Multi_Currency.setup_currencies_sorting(),a(document).on("change",".currency_option_position",WCML_Multi_Currency.price_preview),a(document).on("change",".currency_option_thousand_sep",WCML_Multi_Currency.price_preview),a(document).on("change",".currency_option_decimal_sep",WCML_Multi_Currency.price_preview),a(document).on("change",".currency_option_decimals",WCML_Multi_Currency.price_preview),a(document).on("change",".currency_code select",WCML_Multi_Currency.price_preview),a(document).on("keyup",".wcml-exchange-rate",WCML_Multi_Currency.exchange_rate_check),a("#wcml_mc_options").length&&(WCML_Multi_Currency.wcml_mc_form_submitted=!1,WCML_Multi_Currency.read_form_fields_status(),window.onbeforeunload=function(b){if(!WCML_Multi_Currency.wcml_mc_form_submitted&&WCML_Multi_Currency.form_fields_changed()||WCML_Multi_Currency.is_update_currency_lang_in_progress())return a("#wcml_warn_message").val()},a("#wcml_mc_options").on("submit",function(){WCML_Multi_Currency.wcml_mc_form_submitted=!0}))})},setup_multi_currency_toggle:function(){a("#multi_currency_independent").change(function(){"checked"==a(this).attr("checked")?a("#currency-switcher, #currency-switcher-widget, #currency-switcher-product, #multi-currency-per-language-details, #online-exchange-rates").fadeIn():a("#currency-switcher, #currency-switcher-widget, #currency-switcher-product, #multi-currency-per-language-details, #online-exchange-rates").fadeOut()})},select_currency:function(){var b=a(this).closest(".wcml_currency_options"),c=b.find(".wcml-dialog-close-button");c.attr("data-currency",a(this).val()),c.attr("data-symbol",a(this).find("option:selected").attr("data-symbol")),b.find(".this-currency").html(a(this).val())},delete_currency:function(b){b.preventDefault();var c=!1,d=a(this).data("currency"),e=a(this).data("currency_name"),f=a(this).data("currency_symbol");if(a(".currency_lang_table .wcml-row-currency-lang:first .currency_languages").each(function(){if(!WCML_Multi_Currency.check_currency_language(a(this).find("li").data("lang"),d))return c=!0,!1}),!c){a("#currency_row_"+d+" .currency_action_update").hide();var g=a('<span class="spinner" style="visibility: visible;margin:0;">');return a(this).hide(),a(this).parent().append(g).show(),a.ajax({type:"post",url:ajaxurl,data:{action:"wcml_delete_currency",wcml_nonce:a("#del_currency_nonce").val(),code:d},success:function(b){a("#currency_row_"+d).remove(),a("#currency_row_langs_"+d).remove(),a("#currency_row_del_"+d).remove(),a("#wcml_currencies_order .wcml_currencies_order_"+d).remove(),a("#wcml_currency_options_code_").prepend('<option data-symbol="'+f+'" value="'+d+'">'+e+"</option>"),a("#wcml_currency_options_code_").val(d).trigger("change"),a("#currency-lang-table").find("tr.default_currency select").each(function(){a(this).find("option[value='"+d+"']").remove()}),a(".wcml-ui-dialog").each(function(){WCML_Currency_Switcher_Settings.currency_switcher_preview(a(this))}),1==a(".wcml-row-currency").length&&(a("#online-exchange-rates-no-currencies").next().hide(),a("#online-exchange-rates-no-currencies").show())},done:function(){g.remove()}}),!1}},save_currency:function(){var b=a(this).closest(".wcml-dialog-container"),c=WCML_Multi_Currency.check_on_numeric(b,".currency_option_decimals"),d=WCML_Multi_Currency.check_on_numeric(b,".abstract_amount");if(c||d)return!1;a(".wcml-currency-options-dialog :submit, .wcml-currency-options-dialog :button").prop("disabled",!0);var e=b.find('[name="currency_options[code]"]').val(),f=a('<span class="spinner" style="visibility:visible;position:absolute;margin-left:10px;"></span>');return f.show(),a(this).parent().prepend(f),a.ajax({url:ajaxurl,type:"POST",dataType:"json",data:b.find('[name^="currency_options"]').serialize()+"&action=wcml_save_currency&wcml_nonce="+jQuery("#wcml_save_currency_nonce").val(),success:function(c){if(b.find(".wcml-dialog-close-button").trigger("click"),a(".wcml-ui-dialog").each(function(){WCML_Currency_Switcher_Settings.currency_switcher_preview(a(this))}),0==a("#currency_row_"+e).length){var d=a("#currency-table tr.wcml-row-currency:last").clone();d.attr("id","currency_row_"+e);var f=d.find(".wcml-col-edit a");f.attr("data-content","wcml_currency_options_"+e),f.attr("data-currency",e),f.data("dialog","wcml_currency_options_"+e),f.removeClass("hidden"),a("#currency-table").find("tr.default_currency").before(d);var d=a("#currency-lang-table tr.wcml-row-currency-lang:last").clone();d.attr("id","currency_row_langs_"+e),a("#currency-lang-table").find("tr.default_currency").before(d),d.find(".on a").each(function(){a(this).attr("data-currency",e)}),a("#currency-lang-table").find("tr.default_currency select").each(function(){a(this).append('<option value="'+e+'">'+e+"</option>")}),a("#wcml_currencies_order").append('<li class="wcml_currencies_order_'+e+' ui-sortable-handle" cur="'+e+'">'+c.currency_name_formatted+"</li>");var d=a("#currency-delete-table tr.wcml-row-currency-del:last").clone();d.attr("id","currency_row_del_"+e);var g=d.find(".delete_currency");g.removeClass("hidden"),g.attr("data-currency",e),g.attr("data-currency_name",c.currency_name),g.attr("data-currency_symbol",c.currency_symbol),a("#currency-delete-table").find("tr.default_currency").before(d)}a("#currency_row_"+e+" .wcml-col-currency").html(c.currency_name_formatted),a("#currency_row_"+e+" .wcml-col-rate").html(c.currency_meta_info),a("#wcml_currency_options_"+e).remove(),a("#wcml_mc_options").before(c.currency_options),a('#wcml_currency_options_code_ option[value="'+e+'"]').remove(),a("#online-exchange-rates-no-currencies").is(":visible")&&(a("#online-exchange-rates-no-currencies").hide(),a("#online-exchange-rates-no-currencies").next().show())}}),!1},check_on_numeric:function(b,c){var d=a('<span class="wcml-error">');return WCML_Multi_Currency.is_number(b.find(c).val())?(b.find(c).parent().find(".wcml-error").size()>0&&b.find(c).parent().find(".wcml-error").remove(),!1):(0==b.find(c).parent().find(".wcml-error").size()&&(b.find(c).parent().append(d),d.text(b.find(c).data("message"))),!0)},tooltip:function(){var b=a(this);a(".wp-pointer").fadeOut(100),a(this).pointer({content:"<h3>"+b.data("header")+"</h3><p>"+b.data("content")+"</p>",position:{edge:"left",align:"center",offset:"15 0"}}).pointer("open")},enable_currency_for_language:function(b){if(WCML_Multi_Currency.is_update_currency_lang_in_progress())return!1;b.preventDefault(),a(this).addClass("spinner").removeClass("otgs-ico-no").css("visibility","visible");a(this).closest("tr")[0].rowIndex;a('.default_currency select[rel="'+a(this).data("language")+'"]').append('<option value="'+a(this).data("currency")+'">'+a(this).data("currency")+"</option>"),WCML_Multi_Currency.update_currency_lang(a(this),1,0);var c=a(this).data("title-alt");a(this).data("title-alt",a(this).attr("title")),a(this).attr("title",c)},disable_currency_for_language:function(b){if(WCML_Multi_Currency.is_update_currency_lang_in_progress())return!1;b.preventDefault(),a(this).addClass("spinner").removeClass("otgs-ico-yes").css("visibility","visible");var c=a(this).data("language");if(!WCML_Multi_Currency.check_currency_language(c))return void a(this).removeClass("spinner").addClass("otgs-ico-yes");a(this).closest("tr")[0].rowIndex;a('.currency_languages select[rel="'+a(this).data("language")+'"]').val()==a(this).data("currency")?WCML_Multi_Currency.update_currency_lang(a(this),0,1):WCML_Multi_Currency.update_currency_lang(a(this),0,0),a('.default_currency select[rel="'+a(this).data("language")+'"] option[value="'+a(this).data("currency")+'"]').remove();var d=a(this).data("title-alt");a(this).data("title-alt",a(this).attr("title")),a(this).attr("title",d)},check_currency_language:function(b,c){var d=a('#currency-lang-table a.otgs-ico-yes[data-language="'+b+'"]');return c&&(d=a('#currency-lang-table a.otgs-ico-yes[data-language="'+b+'"]:not([data-currency="'+c+'"]')),0!=d.length||(alert(a("#wcml_warn_disable_language_massage").val()),!1)},is_update_currency_lang_in_progress:function(){return void 0!==WCML_Multi_Currency._update_currency_lang_sync_flag&&1==WCML_Multi_Currency._update_currency_lang_sync_flag},set_update_currency_lang_in_progress:function(a){WCML_Multi_Currency._update_currency_lang_sync_flag=a},update_currency_lang:function(b,c,d){WCML_Multi_Currency._currency_languages_saving++,a("#wcml_mc_options :submit").attr("disabled","disabled"),a('input[name="wcml_mc_options"]').attr("disabled","disabled");var e=b.data("language"),f=b.data("currency");discard=!0,WCML_Multi_Currency.set_update_currency_lang_in_progress(1),a.ajax({type:"post",url:ajaxurl,data:{action:"wcml_update_currency_lang",value:c,lang:e,code:f,wcml_nonce:a("#update_currency_lang_nonce").val()},success:function(){d&&WCML_Multi_Currency.update_default_currency(e,0)},complete:function(){a('input[name="wcml_mc_options"]').removeAttr("disabled"),discard=!1,b.removeClass("spinner").css("visibility","visible"),c?b.addClass("otgs-ico-yes"):b.addClass("otgs-ico-no"),WCML_Multi_Currency._currency_languages_saving--,0==WCML_Multi_Currency._currency_languages_saving&&a("#wcml_mc_options :submit").removeAttr("disabled"),WCML_Multi_Currency.set_update_currency_lang_in_progress(0)}})},change_default_currency:function(){WCML_Multi_Currency.update_default_currency(a(this).attr("rel"),a(this).val(),a(this))},update_default_currency:function(b,c,d){if(a("#wcml_mc_options_submit").attr("disabled","disabled"),d){var e=a('<span class="spinner" style="visibility: visible;float:none;position: absolute">');d.parent().append(e)}discard=!0,a.ajax({type:"post",url:ajaxurl,data:{action:"wcml_update_default_currency",lang:b,code:c,wcml_nonce:a("#wcml_update_default_currency_nonce").val()},complete:function(){discard=!1,a("#wcml_mc_options_submit").removeAttr("disabled"),d&&d.parent().find(".spinner").remove()}})},is_number:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},setup_currencies_sorting:function(){a("#wcml_currencies_order").sortable({update:function(){var b=[];a("#wcml_currencies_order").find("li").each(function(){b.push(a(this).attr("cur"))}),a.ajax({type:"POST",url:ajaxurl,dataType:"json",data:{action:"wcml_currencies_order",wcml_nonce:a("#wcml_currencies_order_order_nonce").val(),order:b.join(";")},success:function(b){b.success&&(fadeInAjxResp(".wcml_currencies_order_ajx_resp",b.data.message),a(".wcml-ui-dialog").each(function(){WCML_Currency_Switcher_Settings.currency_switcher_preview(a(this))}))}})}})},price_preview:function(){var b=a(this).closest(".wcml_currency_options"),c=b.find(".currency_option_position").val(),d=b.find(".currency_option_thousand_sep").val(),d=b.find(".currency_option_thousand_sep").val(),e=b.find(".currency_option_decimal_sep").val(),f=a(this).closest(".wcml_currency_options").find(".wcml-dialog-close-button").attr("data-symbol"),g="56789".substr(0,b.find(".currency_option_decimals").val());""==g&&(e="");var h="";switch(c){case"left":h="{symbol}1{thousand_sep}234{decimal_sep}{decimals}";break;case"right":h="1{thousand_sep}234{decimal_sep}{decimals}{symbol}";break;case"left_space":h="{symbol}&nbsp;1{thousand_sep}234{decimal_sep}{decimals}";break;case"right_space":h="1{thousand_sep}234{decimal_sep}{decimals}&nbsp;{symbol}"}var i=h.replace(/\{symbol\}/,f).replace(/\{thousand_sep\}/,d).replace(/\{decimal_sep\}/,e).replace(/\{decimals\}/,g);return b.find(".wcml-co-preview-value").html(i),!1},read_form_fields_status:function(){this.mc_form_status=a("#wcml_mc_options").serialize()},form_fields_changed:function(){return this.mc_form_status!=a("#wcml_mc_options").serialize()},exchange_rate_check:function(b){if(void 0===c)var c={DOM_SUBTRACT:109,DOM_DASH:189,DOM_E:69};a(this).val()<=0||!WCML_Multi_Currency.is_number(a(this).val())||b.keyCode==c.DOM_SUBTRACT||b.keyCode==c.DOM_DASH||b.keyCode==c.DOM_E?(a(".wcml-co-set-rate .wcml-error").fadeIn(),a(".currency_options_save").attr("disabled","disabled")):(a(".wcml-co-set-rate .wcml-error").fadeOut(),a(".currency_options_save").removeAttr("disabled"))}},WCML_Multi_Currency.init()});
res/js/pointer.min.js CHANGED
@@ -1 +1 @@
1
- var WCML_Pointer=WCML_Pointer||{};!function(a){WCML_Pointer.openPointer=function(b){var c=a("#"+b.data("wcml-open-pointer"));a(".wcml-information-active-pointer").pointer("close"),b.length&&(b.addClass("wcml-information-active-pointer"),b.pointer({pointerClass:"wcml-information-pointer",content:c.html(),position:{edge:"bottom",align:"right"},buttons:function(b,c){var d=a('<a href="javascript:void(0);" class="notice-dismiss alignright"></a>');return d.bind("click.pointer",function(a){a.preventDefault(),c.element.pointer("close")}),d},show:function(a,b){b.pointer.css("marginLeft","115px"),b.pointer.css("z-index","99999")},close:function(a,b){b.pointer.css("marginLeft","0")}}).pointer("open"))},a("body").on("click","[data-wcml-open-pointer]",function(){WCML_Pointer.openPointer(a(this))}),a("body").on("click","a",function(){a(this).hasClass("wcml-pointer-link")||a(".wcml-information-active-pointer").pointer("close")})}(jQuery),jQuery(document).ready(function(a){a(".wcml-pointer-block").each(function(){var b=a(this).data("selector");if(b){var c=a(this).data("insert-method");switch(c){case"prepend":a(this).prependTo(a("#"+b)).show();break;case"append":a(this).appendTo(a("#"+b)).show();break;default:a(this).insertAfter(a("#"+b)).show()}}else a(this).show()})});
1
+ var WCML_Pointer=WCML_Pointer||{};!function(a){WCML_Pointer.openPointer=function(b){var c=a("#"+b.data("wcml-open-pointer"));a(".wcml-information-active-pointer").pointer("close"),b.length&&(b.addClass("wcml-information-active-pointer"),b.pointer({pointerClass:"wcml-information-pointer",content:c.html(),position:{edge:"bottom",align:"right"},buttons:function(b,c){var d=a('<a href="javascript:void(0);" class="notice-dismiss alignright"></a>');return d.bind("click.pointer",function(a){a.preventDefault(),c.element.pointer("close")}),d},show:function(a,b){b.pointer.css("marginLeft","115px"),b.pointer.css("z-index","99999")},close:function(a,b){b.pointer.css("marginLeft","0")}}).pointer("open"))},a("body").on("click","[data-wcml-open-pointer]",function(){WCML_Pointer.openPointer(a(this))}),a("body").on("click","a",function(){a(this).hasClass("wcml-pointer-link")||a(".wcml-information-active-pointer").pointer("close")})}(jQuery),jQuery(document).ready(function(a){a(".wcml-pointer-block").each(function(){var b=a(this).data("selector");if(b){switch(a(this).data("insert-method")){case"prepend":a(this).prependTo(a("#"+b)).show();break;case"append":a(this).appendTo(a("#"+b)).show();break;default:a(this).insertAfter(a("#"+b)).show()}}else a(this).show()})});
res/js/scripts.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).ready(function(a){var b=!1;window.onbeforeunload=function(c){return b?a("#wcml_warn_message").val():void 0},a('.wcml-section input[type="submit"]').click(function(){b=!1}),a(".wcml_search").click(function(){window.location=a(".wcml_products_admin_url").val()+"&cat="+a(".wcml_product_category").val()+"&trst="+a(".wcml_translation_status").val()+"&st="+a(".wcml_product_status").val()+"&slang="+a(".wcml_translation_status_lang").val()}),a(".wcml_search_by_title").click(function(){window.location=a(".wcml_products_admin_url").val()+"&s="+a(".wcml_product_name").val()}),a(".wcml_reset_search").click(function(){window.location=a(".wcml_products_admin_url").val()}),"undefined"!=typeof TaxonomyTranslation&&(TaxonomyTranslation.views.TermView=TaxonomyTranslation.views.TermView.extend({initialize:function(){TaxonomyTranslation.views.TermView.__super__.initialize.apply(this,arguments),this.listenTo(this.model,"translationSaved",this.render_overlay)},render_overlay:function(){var b=TaxonomyTranslation.classes.taxonomy.get("taxonomy");a.ajax({type:"post",url:ajaxurl,dataType:"json",data:{action:"wcml_update_term_translated_warnings",taxonomy:b,wcml_nonce:a("#wcml_update_term_translated_warnings_nonce").val()},success:function(c){c.hide&&(c.is_attribute?(a(".tax-product-attributes").removeAttr("title"),a(".tax-product-attributes i.otgs-ico-warning").remove()):(a(".js-tax-tab-"+b).removeAttr("title"),a(".js-tax-tab-"+b+" i.otgs-ico-warning").remove()))}})}})),a(document).on("submit","#wcml_tt_sync_variations",function(){var b=a("#wcml_tt_sync_variations"),c=b.serialize();return b.find(".wcml_tt_spinner").fadeIn(),b.find("input[type=submit]").attr("disabled","disabled"),a.ajax({type:"post",url:ajaxurl,dataType:"json",data:c,success:function(a){b.find(".wcml_tt_sycn_preview").html(a.progress),a.go?(b.find("input[name=last_post_id]").val(a.last_post_id),b.find("input[name=languages_processed]").val(a.languages_processed),b.trigger("submit")):(b.find("input[name=last_post_id]").val(0),b.find(".wcml_tt_spinner").fadeOut(),b.find("input").removeAttr("disabled"),jQuery("#wcml_tt_sync_assignment").fadeOut(),jQuery("#wcml_tt_sync_desc").fadeOut())}}),!1}),a(document).on("submit","#wcml_tt_sync_assignment",function(){var b=a("#wcml_tt_sync_assignment"),c=b.serialize();return b.find(".wcml_tt_spinner").fadeIn(),b.find("input").attr("disabled","disabled"),a(".wcml_tt_sync_row").remove(),a.ajax({type:"POST",dataType:"json",url:ajaxurl,data:"action=wcml_tt_sync_taxonomies_in_content_preview&wcml_nonce="+a("#wcml_sync_taxonomies_in_content_preview_nonce").val()+"&"+c,success:function(a){b.find(".wcml_tt_spinner").fadeOut(),b.find("input").removeAttr("disabled"),a.errors?b.find(".errors").html(a.errors):(jQuery("#wcml_tt_sync_preview").html(a.html),jQuery("#wcml_tt_sync_assignment").fadeOut(),jQuery("#wcml_tt_sync_desc").fadeOut())}}),!1}),a(document).on("click","form.wcml_tt_do_sync a.submit",function(){var b=a("form.wcml_tt_do_sync"),c=b.serialize();return b.find(".wcml_tt_spinner").fadeIn(),b.find("input").attr("disabled","disabled"),jQuery.ajax({type:"POST",dataType:"json",url:ajaxurl,data:"action=wcml_tt_sync_taxonomies_in_content&wcml_nonce="+a("#wcml_sync_taxonomies_in_content_nonce").val()+"&"+c,success:function(a){b.find(".wcml_tt_spinner").fadeOut(),b.find("input").removeAttr("disabled"),a.errors?b.find(".errors").html(a.errors):b.closest(".wcml_tt_sync_row").html(a.html)}}),!1});new Array;a("#wcml_custom_exchange_rates").submit(function(){var b=a(this);return b.find(":submit").parent().prepend(icl_ajxloaderimg+"&nbsp;"),b.find(":submit").prop("disabled",!0),a.ajax({type:"post",dataType:"json",url:ajaxurl,data:b.serialize(),success:function(){b.find(":submit").prev().remove(),b.find(":submit").prop("disabled",!1)}}),!1}),a(document).on("click",".wcml_save_base",function(b){b.preventDefault();var c=a(this),d=a(this).closest(".wcml-dialog-container"),e="#wcml-edit-base-slug-"+c.attr("data-base")+"-"+c.attr("data-language")+"-link",f="#wcml-edit-base-slug-"+c.attr("data-base")+"-"+c.attr("data-language");a.ajax({type:"post",url:ajaxurl,dataType:"json",data:{action:"wcml_update_base_translation",base:c.attr("data-base"),base_value:d.find("#base-original").val(),base_translation:d.find("#base-translation").val(),language:c.attr("data-language"),wcml_nonce:a("#wcml_update_base_nonce").val()},success:function(b){a(f).remove(),a(e).find("i").remove(),a(e).append('<i class="otgs-ico-edit" >'),a(e).parent().prepend(b)}})}),a(document).on("click",".hide-rate-block",function(){var b=a(this).closest(".wcml-wrap");a(this).attr("disabled","disabled");var c=a('<span class="spinner" style="visibility: visible;">'),d=jQuery(this).data("setting");return a(this).parent().prepend(c),a(this).remove(),a.ajax({type:"post",url:ajaxurl,dataType:"json",data:{action:"wcml_update_setting_ajx",setting:d,value:1,nonce:a("#wcml_settings_nonce").val()},success:function(a){b.hide()}}),!1}),a(document).on("click","#term-table-sync-header",function(){a("#wcml_tt_sync_assignment").hide(),a("#wcml_tt_sync_desc").hide()}),a(document).on("click","#term-table-header",function(){a("#wcml_tt_sync_assignment").data("sync")&&(a("#wcml_tt_sync_assignment").show(),a("#wcml_tt_sync_desc").show())})});
1
+ jQuery(document).ready(function(a){var b=!1;window.onbeforeunload=function(c){if(b)return a("#wcml_warn_message").val()},a('.wcml-section input[type="submit"]').click(function(){b=!1}),a(".wcml_search").click(function(){window.location=a(".wcml_products_admin_url").val()+"&cat="+a(".wcml_product_category").val()+"&trst="+a(".wcml_translation_status").val()+"&st="+a(".wcml_product_status").val()+"&slang="+a(".wcml_translation_status_lang").val()}),a(".wcml_search_by_title").click(function(){window.location=a(".wcml_products_admin_url").val()+"&s="+a(".wcml_product_name").val()}),a(".wcml_reset_search").click(function(){window.location=a(".wcml_products_admin_url").val()}),"undefined"!=typeof TaxonomyTranslation&&(TaxonomyTranslation.views.TermView=TaxonomyTranslation.views.TermView.extend({initialize:function(){TaxonomyTranslation.views.TermView.__super__.initialize.apply(this,arguments),this.listenTo(this.model,"translationSaved",this.render_overlay)},render_overlay:function(){var b=TaxonomyTranslation.classes.taxonomy.get("taxonomy");a.ajax({type:"post",url:ajaxurl,dataType:"json",data:{action:"wcml_update_term_translated_warnings",taxonomy:b,wcml_nonce:a("#wcml_update_term_translated_warnings_nonce").val()},success:function(c){c.hide&&(c.is_attribute?(a(".tax-product-attributes").removeAttr("title"),a(".tax-product-attributes i.otgs-ico-warning").remove()):(a(".js-tax-tab-"+b).removeAttr("title"),a(".js-tax-tab-"+b+" i.otgs-ico-warning").remove()))}})}})),a(document).on("submit","#wcml_tt_sync_variations",function(){var b=a("#wcml_tt_sync_variations"),c=b.serialize();return b.find(".wcml_tt_spinner").fadeIn(),b.find("input[type=submit]").attr("disabled","disabled"),a.ajax({type:"post",url:ajaxurl,dataType:"json",data:c,success:function(a){b.find(".wcml_tt_sycn_preview").html(a.progress),a.go?(b.find("input[name=last_post_id]").val(a.last_post_id),b.find("input[name=languages_processed]").val(a.languages_processed),b.trigger("submit")):(b.find("input[name=last_post_id]").val(0),b.find(".wcml_tt_spinner").fadeOut(),b.find("input").removeAttr("disabled"),jQuery("#wcml_tt_sync_assignment").fadeOut(),jQuery("#wcml_tt_sync_desc").fadeOut())}}),!1}),a(document).on("submit","#wcml_tt_sync_assignment",function(){var b=a("#wcml_tt_sync_assignment"),c=b.serialize();return b.find(".wcml_tt_spinner").fadeIn(),b.find("input").attr("disabled","disabled"),a(".wcml_tt_sync_row").remove(),a.ajax({type:"POST",dataType:"json",url:ajaxurl,data:"action=wcml_tt_sync_taxonomies_in_content_preview&wcml_nonce="+a("#wcml_sync_taxonomies_in_content_preview_nonce").val()+"&"+c,success:function(a){b.find(".wcml_tt_spinner").fadeOut(),b.find("input").removeAttr("disabled"),a.errors?b.find(".errors").html(a.errors):(jQuery("#wcml_tt_sync_preview").html(a.html),jQuery("#wcml_tt_sync_assignment").fadeOut(),jQuery("#wcml_tt_sync_desc").fadeOut())}}),!1}),a(document).on("click","form.wcml_tt_do_sync a.submit",function(){var b=a("form.wcml_tt_do_sync"),c=b.serialize();return b.find(".wcml_tt_spinner").fadeIn(),b.find("input").attr("disabled","disabled"),jQuery.ajax({type:"POST",dataType:"json",url:ajaxurl,data:"action=wcml_tt_sync_taxonomies_in_content&wcml_nonce="+a("#wcml_sync_taxonomies_in_content_nonce").val()+"&"+c,success:function(a){b.find(".wcml_tt_spinner").fadeOut(),b.find("input").removeAttr("disabled"),a.errors?b.find(".errors").html(a.errors):b.closest(".wcml_tt_sync_row").html(a.html)}}),!1});new Array;a("#wcml_custom_exchange_rates").submit(function(){var b=a(this);return b.find(":submit").parent().prepend(icl_ajxloaderimg+"&nbsp;"),b.find(":submit").prop("disabled",!0),a.ajax({type:"post",dataType:"json",url:ajaxurl,data:b.serialize(),success:function(){b.find(":submit").prev().remove(),b.find(":submit").prop("disabled",!1)}}),!1}),a(document).on("click",".wcml_save_base",function(b){b.preventDefault();var c=a(this),d=a(this).closest(".wcml-dialog-container"),e="#wcml-edit-base-slug-"+c.attr("data-base")+"-"+c.attr("data-language")+"-link",f="#wcml-edit-base-slug-"+c.attr("data-base")+"-"+c.attr("data-language");a.ajax({type:"post",url:ajaxurl,dataType:"json",data:{action:"wcml_update_base_translation",base:c.attr("data-base"),base_value:d.find("#base-original").val(),base_translation:d.find("#base-translation").val(),language:c.attr("data-language"),wcml_nonce:a("#wcml_update_base_nonce").val()},success:function(b){a(f).remove(),a(e).find("i").remove(),a(e).append('<i class="otgs-ico-edit" >'),a(e).parent().prepend(b)}})}),a(document).on("click",".hide-rate-block",function(){var b=a(this).closest(".wcml-wrap");a(this).attr("disabled","disabled");var c=a('<span class="spinner" style="visibility: visible;">'),d=jQuery(this).data("setting");return a(this).parent().prepend(c),a(this).remove(),a.ajax({type:"post",url:ajaxurl,dataType:"json",data:{action:"wcml_update_setting_ajx",setting:d,value:1,nonce:a("#wcml_settings_nonce").val()},success:function(a){b.hide()}}),!1}),a(document).on("click","#term-table-sync-header",function(){a("#wcml_tt_sync_assignment").hide(),a("#wcml_tt_sync_desc").hide()}),a(document).on("click","#term-table-header",function(){a("#wcml_tt_sync_assignment").data("sync")&&(a("#wcml_tt_sync_assignment").show(),a("#wcml_tt_sync_desc").show())})});
res/js/tooltip_init.min.js CHANGED
@@ -1 +1 @@
1
- var WCML_Tooltip={default_args:{attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200},setup:function(){jQuery(document).ready(function(){WCML_Tooltip.init()})},init:function(){jQuery(".wcml-tip:visible").tipTip(WCML_Tooltip.default_args)},create_tip:function(a,b,c){"undefined"==typeof c&&(c={});var d=jQuery('<i class="otgs-ico-help wcml-tip" data-tip="'+a+'" style="'+b+'"></i>');for(var e in WCML_Tooltip.default_args)"undefined"==typeof c[e]&&(c[e]=WCML_Tooltip.default_args[e]);return d.tipTip(c),d},add_before:function(a,b,c,d){return tip=WCML_Tooltip.create_tip(b,c,d),tip.insertBefore(a),tip},add_after:function(a,b,c,d){return tip=WCML_Tooltip.create_tip(b,c,d),tip.insertAfter(a),tip}};WCML_Tooltip.setup();
1
+ var WCML_Tooltip={default_args:{attribute:"data-tip",fadeIn:50,fadeOut:50,delay:200},setup:function(){jQuery(document).ready(function(){WCML_Tooltip.init()})},init:function(){jQuery(".wcml-tip:visible").tipTip(WCML_Tooltip.default_args)},create_tip:function(a,b,c){void 0===c&&(c={});var d=jQuery('<i class="otgs-ico-help wcml-tip" data-tip="'+a+'" style="'+b+'"></i>');for(var e in WCML_Tooltip.default_args)void 0===c[e]&&(c[e]=WCML_Tooltip.default_args[e]);return d.tipTip(c),d},add_before:function(a,b,c,d){return tip=WCML_Tooltip.create_tip(b,c,d),tip.insertBefore(a),tip},add_after:function(a,b,c,d){return tip=WCML_Tooltip.create_tip(b,c,d),tip.insertAfter(a),tip}};WCML_Tooltip.setup();
res/js/troubleshooting.min.js CHANGED
@@ -1 +1 @@
1
- function update_product_count(){jQuery.ajax({type:"post",url:ajaxurl,data:{action:"trbl_update_count",wcml_nonce:jQuery("#trbl_update_count_nonce").val()},success:function(a){jQuery(".var_status").each(function(){jQuery(this).html(a)}),jQuery("#count_prod_variat").val(a),jQuery("#wcml_sync_product_variations").is(":checked")?sync_variations():jQuery("#wcml_sync_gallery_images").is(":checked")?sync_product_gallery():jQuery("#wcml_sync_categories").is(":checked")?sync_product_categories():jQuery("#wcml_duplicate_terms").is(":checked")?duplicate_terms():(jQuery("#wcml_trbl").removeAttr("disabled"),jQuery(".spinner").hide(),jQuery("#wcml_trbl").next().fadeOut())}})}function sync_variations(){jQuery.ajax({type:"post",url:ajaxurl,data:{action:"trbl_sync_variations",wcml_nonce:jQuery("#trbl_sync_variations_nonce").val()},success:function(a){if(0==jQuery("#count_prod_variat").val())jQuery(".var_status").each(function(){jQuery(this).html(0)}),jQuery("#wcml_sync_gallery_images").is(":checked")?sync_product_gallery():jQuery("#wcml_sync_categories").is(":checked")?sync_product_categories():jQuery("#wcml_duplicate_terms").is(":checked")?duplicate_terms():(jQuery("#wcml_trbl").removeAttr("disabled"),jQuery(".spinner").hide(),jQuery("#wcml_trbl").next().fadeOut());else{var b=jQuery("#count_prod_variat").val()-3;0>b&&(b=0),jQuery(".var_status").each(function(){jQuery(this).html(b)}),jQuery("#count_prod_variat").val(b),sync_variations()}}})}function sync_product_gallery(){jQuery.ajax({type:"post",url:ajaxurl,data:{action:"trbl_gallery_images",wcml_nonce:jQuery("#trbl_gallery_images_nonce").val(),page:jQuery("#sync_galerry_page").val()},success:function(a){if(0==jQuery("#count_prod").val())jQuery("#wcml_sync_categories").is(":checked")?sync_product_categories():jQuery("#wcml_duplicate_terms").is(":checked")?duplicate_terms():(jQuery("#wcml_trbl").removeAttr("disabled"),jQuery(".spinner").hide(),jQuery("#wcml_trbl").next().fadeOut()),jQuery(".gallery_status").html(0);else{var b=jQuery("#count_prod").val()-5;0>b?b=0:jQuery("#sync_galerry_page").val(parseInt(jQuery("#sync_galerry_page").val())+1),jQuery(".gallery_status").html(b),jQuery("#count_prod").val(b),sync_product_gallery()}}})}function sync_product_categories(){jQuery.ajax({type:"post",url:ajaxurl,data:{action:"trbl_sync_categories",wcml_nonce:jQuery("#trbl_sync_categories_nonce").val(),page:jQuery("#sync_category_page").val()},success:function(a){if(0==jQuery("#count_categories").val())jQuery("#wcml_duplicate_terms").is(":checked")?duplicate_terms():(jQuery("#wcml_trbl").removeAttr("disabled"),jQuery(".spinner").hide(),jQuery("#wcml_trbl").next().fadeOut()),jQuery(".cat_status").html(0);else{var b=jQuery("#count_categories").val()-5;0>b?b=0:jQuery("#sync_category_page").val(parseInt(jQuery("#sync_category_page").val())+1),jQuery(".cat_status").html(b),jQuery("#count_categories").val(b),sync_product_categories()}}})}function duplicate_terms(){jQuery.ajax({type:"post",url:ajaxurl,data:{action:"trbl_duplicate_terms",wcml_nonce:jQuery("#trbl_duplicate_terms_nonce").val(),attr:jQuery("#attr_to_duplicate option:selected").val()},success:function(a){if(0==jQuery("#count_terms").val())jQuery("#wcml_trbl").removeAttr("disabled"),jQuery(".spinner").hide(),jQuery("#wcml_trbl").next().fadeOut(),jQuery(".attr_status").html(0);else{var b=jQuery("#count_terms").val()-5;0>b&&(b=0),jQuery(".attr_status").html(b),jQuery("#count_terms").val(b),duplicate_terms()}}})}function fix_product_type_terms(){jQuery.ajax({type:"post",url:ajaxurl,data:{action:"trbl_fix_product_type_terms",wcml_nonce:jQuery("#trbl_product_type_terms_nonce").val()},success:function(a){jQuery("#wcml_product_type_trbl").removeAttr("disabled"),jQuery(".product_type_spinner").hide(),jQuery(".product_type_fix_done").show(),setTimeout(function(){jQuery(".product_type_fix_done").fadeOut(300)},2e3)}})}jQuery(document).ready(function(){jQuery("#wcml_trbl").on("click",function(){var a=jQuery(this);a.attr("disabled","disabled"),jQuery(".spinner").css("display","inline-block").css("visibility","visible"),jQuery("#wcml_sync_update_product_count").is(":checked")?update_product_count():jQuery("#wcml_sync_product_variations").is(":checked")?sync_variations():jQuery("#wcml_sync_gallery_images").is(":checked")?sync_product_gallery():jQuery("#wcml_sync_categories").is(":checked")?sync_product_categories():jQuery("#wcml_duplicate_terms").is(":checked")&&duplicate_terms()}),jQuery("#attr_to_duplicate").on("change",function(){jQuery(".attr_status").html(jQuery(this).find("option:selected").attr("rel")),jQuery("#count_terms").val(jQuery(this).find("option:selected").attr("rel"))}),jQuery("#wcml_product_type_trbl").on("click",function(){var a=jQuery(this);a.attr("disabled","disabled"),jQuery(".product_type_spinner").css("display","inline-block").css("visibility","visible"),fix_product_type_terms()})});
1
+ function update_product_count(){jQuery.ajax({type:"post",url:ajaxurl,data:{action:"trbl_update_count",wcml_nonce:jQuery("#trbl_update_count_nonce").val()},success:function(a){jQuery(".var_status").each(function(){jQuery(this).html(a)}),jQuery("#count_prod_variat").val(a),jQuery("#wcml_sync_product_variations").is(":checked")?sync_variations():jQuery("#wcml_sync_gallery_images").is(":checked")?sync_product_gallery():jQuery("#wcml_sync_categories").is(":checked")?sync_product_categories():jQuery("#wcml_duplicate_terms").is(":checked")?duplicate_terms():(jQuery("#wcml_trbl").removeAttr("disabled"),jQuery(".spinner").hide(),jQuery("#wcml_trbl").next().fadeOut())}})}function sync_variations(){jQuery.ajax({type:"post",url:ajaxurl,data:{action:"trbl_sync_variations",wcml_nonce:jQuery("#trbl_sync_variations_nonce").val()},success:function(a){if(0==jQuery("#count_prod_variat").val())jQuery(".var_status").each(function(){jQuery(this).html(0)}),jQuery("#wcml_sync_gallery_images").is(":checked")?sync_product_gallery():jQuery("#wcml_sync_categories").is(":checked")?sync_product_categories():jQuery("#wcml_duplicate_terms").is(":checked")?duplicate_terms():(jQuery("#wcml_trbl").removeAttr("disabled"),jQuery(".spinner").hide(),jQuery("#wcml_trbl").next().fadeOut());else{var b=jQuery("#count_prod_variat").val()-3;b<0&&(b=0),jQuery(".var_status").each(function(){jQuery(this).html(b)}),jQuery("#count_prod_variat").val(b),sync_variations()}}})}function sync_product_gallery(){jQuery.ajax({type:"post",url:ajaxurl,data:{action:"trbl_gallery_images",wcml_nonce:jQuery("#trbl_gallery_images_nonce").val(),page:jQuery("#sync_galerry_page").val()},success:function(a){if(0==jQuery("#count_prod").val())jQuery("#wcml_sync_categories").is(":checked")?sync_product_categories():jQuery("#wcml_duplicate_terms").is(":checked")?duplicate_terms():(jQuery("#wcml_trbl").removeAttr("disabled"),jQuery(".spinner").hide(),jQuery("#wcml_trbl").next().fadeOut()),jQuery(".gallery_status").html(0);else{var b=jQuery("#count_prod").val()-5;b<0?b=0:jQuery("#sync_galerry_page").val(parseInt(jQuery("#sync_galerry_page").val())+1),jQuery(".gallery_status").html(b),jQuery("#count_prod").val(b),sync_product_gallery()}}})}function sync_product_categories(){jQuery.ajax({type:"post",url:ajaxurl,data:{action:"trbl_sync_categories",wcml_nonce:jQuery("#trbl_sync_categories_nonce").val(),page:jQuery("#sync_category_page").val()},success:function(a){if(0==jQuery("#count_categories").val())jQuery("#wcml_duplicate_terms").is(":checked")?duplicate_terms():(jQuery("#wcml_trbl").removeAttr("disabled"),jQuery(".spinner").hide(),jQuery("#wcml_trbl").next().fadeOut()),jQuery(".cat_status").html(0);else{var b=jQuery("#count_categories").val()-5;b<0?b=0:jQuery("#sync_category_page").val(parseInt(jQuery("#sync_category_page").val())+1),jQuery(".cat_status").html(b),jQuery("#count_categories").val(b),sync_product_categories()}}})}function duplicate_terms(){jQuery.ajax({type:"post",url:ajaxurl,data:{action:"trbl_duplicate_terms",wcml_nonce:jQuery("#trbl_duplicate_terms_nonce").val(),attr:jQuery("#attr_to_duplicate option:selected").val()},success:function(a){if(0==jQuery("#count_terms").val())jQuery("#wcml_trbl").removeAttr("disabled"),jQuery(".spinner").hide(),jQuery("#wcml_trbl").next().fadeOut(),jQuery(".attr_status").html(0);else{var b=jQuery("#count_terms").val()-5;b<0&&(b=0),jQuery(".attr_status").html(b),jQuery("#count_terms").val(b),duplicate_terms()}}})}function fix_product_type_terms(){jQuery.ajax({type:"post",url:ajaxurl,data:{action:"trbl_fix_product_type_terms",wcml_nonce:jQuery("#trbl_product_type_terms_nonce").val()},success:function(a){jQuery("#wcml_product_type_trbl").removeAttr("disabled"),jQuery(".product_type_spinner").hide(),jQuery(".product_type_fix_done").show(),setTimeout(function(){jQuery(".product_type_fix_done").fadeOut(300)},2e3)}})}jQuery(document).ready(function(){jQuery("#wcml_trbl").on("click",function(){jQuery(this).attr("disabled","disabled"),jQuery(".spinner").css("display","inline-block").css("visibility","visible"),jQuery("#wcml_sync_update_product_count").is(":checked")?update_product_count():jQuery("#wcml_sync_product_variations").is(":checked")?sync_variations():jQuery("#wcml_sync_gallery_images").is(":checked")?sync_product_gallery():jQuery("#wcml_sync_categories").is(":checked")?sync_product_categories():jQuery("#wcml_duplicate_terms").is(":checked")&&duplicate_terms()}),jQuery("#attr_to_duplicate").on("change",function(){jQuery(".attr_status").html(jQuery(this).find("option:selected").attr("rel")),jQuery("#count_terms").val(jQuery(this).find("option:selected").attr("rel"))}),jQuery("#wcml_product_type_trbl").on("click",function(){jQuery(this).attr("disabled","disabled"),jQuery(".product_type_spinner").css("display","inline-block").css("visibility","visible"),fix_product_type_terms()})});
res/js/wcml-multi-currency.min.js CHANGED
@@ -1 +1 @@
1
- function wcml_load_currency(a,b){var c=jQuery('<img style="margin-left:10px;" width="16" heigth="16" src="'+wcml_mc_settings.wcml_spinner+'" />');jQuery(".wcml_currency_switcher").after(),c.insertAfter(jQuery(".wcml_currency_switcher")),"undefined"==typeof b&&(b=0),jQuery.ajax({type:"post",url:woocommerce_params.ajax_url,dataType:"json",data:{action:"wcml_switch_currency",currency:a,force_switch:b,wcml_nonce:wcml_mc_settings.wcml_mc_nonce},success:function(b){if("undefined"!=typeof b.error)alert(b.error);else if("undefined"!=typeof b.prevent_switching)jQuery("body").append(b.prevent_switching);else{if("undefined"!=typeof wcml_mc_settings.w3tc){var c=window.location.href;c=c.replace(/&wcmlc(\=[^&]*)?(?=&|$)|wcmlc(\=[^&]*)?(&|$)/,""),c=c.replace(/\?$/,"");var d=-1!=c.indexOf("?")?"&":"?",e=c+d+"wcmlc="+a}else var e=window.location.href;window.location=e}}})}jQuery(document).ready(function(){jQuery(document).on("click",".wcml_currency_switcher a",function(a){return a.preventDefault(),jQuery(this).is(":disabled")||jQuery(this).parent().hasClass("wcml-cs-active-currency")||jQuery(this).hasClass("wcml-cs-active-currency")?!1:(jQuery(this).off(a),void wcml_load_currency(jQuery(this).attr("rel")))}),"undefined"!=typeof woocommerce_price_slider_params&&(woocommerce_price_slider_params.currency_symbol=wcml_mc_settings.current_currency.symbol)});
1
+ function wcml_load_currency(a,b){var c=jQuery('<img style="margin-left:10px;" width="16" heigth="16" src="'+wcml_mc_settings.wcml_spinner+'" />');jQuery(".wcml_currency_switcher").after(),c.insertAfter(jQuery(".wcml_currency_switcher")),void 0===b&&(b=0),jQuery.ajax({type:"post",url:woocommerce_params.ajax_url,dataType:"json",data:{action:"wcml_switch_currency",currency:a,force_switch:b,wcml_nonce:wcml_mc_settings.wcml_mc_nonce},success:function(b){if(void 0!==b.error)alert(b.error);else if(void 0!==b.prevent_switching)jQuery("body").append(b.prevent_switching);else{if(void 0!==wcml_mc_settings.w3tc){var c=window.location.href;c=c.replace(/&wcmlc(\=[^&]*)?(?=&|$)|wcmlc(\=[^&]*)?(&|$)/,""),c=c.replace(/\?$/,"");var d=c.indexOf("?")!=-1?"&":"?",e=c+d+"wcmlc="+a}else var e=window.location.href;window.location=e}}})}jQuery(document).ready(function(){jQuery(document).on("click",".wcml_currency_switcher a",function(a){if(a.preventDefault(),jQuery(this).is(":disabled")||jQuery(this).parent().hasClass("wcml-cs-active-currency")||jQuery(this).hasClass("wcml-cs-active-currency"))return!1;jQuery(this).off(a),wcml_load_currency(jQuery(this).attr("rel"))}),"undefined"!=typeof woocommerce_price_slider_params&&(woocommerce_price_slider_params.currency_symbol=wcml_mc_settings.current_currency.symbol)});
res/js/wcml-translation-editor.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(function(a){var b={is_wcml_product:!1,field_views:null,footer_view:null,save_buttons_tip:null,init:function(){a(document).on("WPML_TM.editor.before_render",b.do_editor_before_render),a(document).on("WPML_TM.editor.ready",b.do_editor_ready)},show_file_paths_button:function(a,b){"file-url"===b.field.field_type.substr(0,8)&&b.$el.append('<div style="display: inline-block;width: 100%;"><button type="button" class="button-secondary wcml_file_paths_button" style="float: right;margin-right: 17px;">'+wcml_settings.strings.choose+"</button></div>")},show_downloadable_files_frame:function(b){var c,d,e,f=a(this);if(d=f.closest(".wpml-form-row").find(".translated_value"),e=d.val(),b.preventDefault(),c)return void c.open();var g=[new wp.media.controller.Library({library:wp.media.query(),multiple:!0,title:f.data("choose"),priority:20,filterable:"uploaded"})];c=wp.media.frames.downloadable_file=wp.media({title:f.data("choose"),library:{type:""},button:{text:f.data("update")},multiple:!0,states:g}),c.on("select",function(){var a=c.state().get("selection");a.map(function(a){a=a.toJSON(),a.url&&(e=a.url)}),d.val(e)}),c.on("ready",function(){c.uploader.options.uploader.params={type:"downloadable_product"}}),c.open()},update_slug:function(){var b=a("#job_field_title .js-translated-value").val(),c=a("#job_field_slug .js-translated-value");if(""!=b&&""==c.val()){var d=a("#icl_tm_editor input[name=job_id]").val();c.prop("readonly","on"),a.ajax({url:ajaxurl,type:"POST",dataType:"json",data:{action:"wcml_editor_auto_slug",title:b,job_id:d},success:function(b){c.val(b.slug),c.removeAttr("readonly"),a("#icl_tm_copy_link_slug").prop("disabled","on")}})}},do_editor_before_render:function(c,d){b.is_wcml_product="post_product"===d,b.is_wcml_product&&(a(document).on("WPML_TM.editor.field_view_ready",b.show_file_paths_button),a(document).on("WPML_TM.editor.field_update_ui",b.field_update_ui),a(document).on("click",".wcml_file_paths_button",b.show_downloadable_files_frame),a(document).on("blur","#job_field_title .js-translated-value",b.update_slug),a(document).on("focus","#job_field_slug .js-translated-value",b.update_slug),a(document).on("blur","#job_field_slug .js-translated-value",b.update_slug))},do_editor_ready:function(a,c,d,e){b.is_wcml_product&&(b.save_buttons_tip=WCML_Tooltip.add_before(".js-save-and-close",wcml_settings.strings.save_tooltip,"margin-right: 3px;"),b.field_views=d,b.footer_view=e,b.update_save_button_state(),b.check_variations_fields(),wcml_settings.hide_resign?b.footer_view.hideResignButton(!0):WCML_Tooltip.add_after(".js-resign",wcml_settings.strings.resign_tooltip,"margin-left:-12px;"))},update_save_button_state:function(){var a=["title","product_content","product_excerpt"],c=!0;_.each(b.field_views,function(d){var e=d.getTranslation();""!==e&&-1!==jQuery.inArray(d.getFieldType(),a)&&(c=!1,b.save_buttons_tip&&b.save_buttons_tip.hide())}),c&&b.save_buttons_tip.show(),b.footer_view.disableSaveButtons(c)},field_update_ui:function(a,c){b.update_save_button_state()},check_variations_fields:function(){var a=!1;jQuery('[id^="job_field_variation_desc"]').closest(".postbox").find(".original_value").each(function(){return""!==jQuery(this).val()?!1:void(a=jQuery(this))}),a&&a.closest(".postbox").find(".button-link").click()}};b.init()});
1
+ jQuery(function(a){var b={is_wcml_product:!1,field_views:null,footer_view:null,save_buttons_tip:null,init:function(){a(document).on("WPML_TM.editor.before_render",b.do_editor_before_render),a(document).on("WPML_TM.editor.ready",b.do_editor_ready)},show_file_paths_button:function(a,b){"file-url"===b.field.field_type.substr(0,8)&&b.$el.append('<div style="display: inline-block;width: 100%;"><button type="button" class="button-secondary wcml_file_paths_button" style="float: right;margin-right: 17px;">'+wcml_settings.strings.choose+"</button></div>")},show_downloadable_files_frame:function(b){var c,d,e,f=a(this);if(d=f.closest(".wpml-form-row").find(".translated_value"),e=d.val(),b.preventDefault(),c)return void c.open();var g=[new wp.media.controller.Library({library:wp.media.query(),multiple:!0,title:f.data("choose"),priority:20,filterable:"uploaded"})];c=wp.media.frames.downloadable_file=wp.media({title:f.data("choose"),library:{type:""},button:{text:f.data("update")},multiple:!0,states:g}),c.on("select",function(){c.state().get("selection").map(function(a){a=a.toJSON(),a.url&&(e=a.url)}),d.val(e)}),c.on("ready",function(){c.uploader.options.uploader.params={type:"downloadable_product"}}),c.open()},update_slug:function(){var b=a("#job_field_title .js-translated-value").val(),c=a("#job_field_slug .js-translated-value");if(""!=b&&""==c.val()){var d=a("#icl_tm_editor input[name=job_id]").val();c.prop("readonly","on"),a.ajax({url:ajaxurl,type:"POST",dataType:"json",data:{action:"wcml_editor_auto_slug",title:b,job_id:d},success:function(b){c.val(b.slug),c.removeAttr("readonly"),a("#icl_tm_copy_link_slug").prop("disabled","on")}})}},do_editor_before_render:function(c,d){b.is_wcml_product="post_product"===d,b.is_wcml_product&&(a(document).on("WPML_TM.editor.field_view_ready",b.show_file_paths_button),a(document).on("WPML_TM.editor.field_update_ui",b.field_update_ui),a(document).on("click",".wcml_file_paths_button",b.show_downloadable_files_frame),a(document).on("blur","#job_field_title .js-translated-value",b.update_slug),a(document).on("focus","#job_field_slug .js-translated-value",b.update_slug),a(document).on("blur","#job_field_slug .js-translated-value",b.update_slug))},do_editor_ready:function(a,c,d,e){b.is_wcml_product&&(b.save_buttons_tip=WCML_Tooltip.add_before(".js-save-and-close",wcml_settings.strings.save_tooltip,"margin-right: 3px;"),b.field_views=d,b.footer_view=e,b.update_save_button_state(),b.check_variations_fields(),wcml_settings.hide_resign?b.footer_view.hideResignButton(!0):WCML_Tooltip.add_after(".js-resign",wcml_settings.strings.resign_tooltip,"margin-left:-12px;"))},update_save_button_state:function(){var a=["title","product_content","product_excerpt"],c=!0;_.each(b.field_views,function(d){""!==d.getTranslation()&&jQuery.inArray(d.getFieldType(),a)!==-1&&(c=!1,b.save_buttons_tip&&b.save_buttons_tip.hide())}),c&&b.save_buttons_tip.show(),b.footer_view.disableSaveButtons(c)},field_update_ui:function(a,c){b.update_save_button_state()},check_variations_fields:function(){var a=!1;jQuery('[id^="job_field_variation_desc"]').closest(".postbox").find(".original_value").each(function(){if(""!==jQuery(this).val())return!1;a=jQuery(this)}),a&&a.closest(".postbox").find(".button-link").click()}};b.init()});
templates/currency-switchers/legacy-dropdown-click/style.css CHANGED
@@ -1 +1 @@
1
- .wcml-dropdown-click{width:15.5em;max-width:100%}.wcml-dropdown-click>ul{position:relative;padding:0;margin:0 !important;list-style-type:none}.wcml-dropdown-click li{list-style-type:none;padding:0;margin:0;border:1px solid #cdcdcd;background-color:#fff}.wcml-dropdown-click li:hover,.wcml-dropdown-click li:focus{background-color:#f5f5f5}.wcml-dropdown-click a{display:block;text-decoration:none;padding:.5em .5em .4em;line-height:1;box-shadow:none !important;cursor:pointer}.wcml-dropdown-click a:hover{box-shadow:none !important;text-decoration:none}.wcml-dropdown-click a.wcml-cs-item-toggle{position:relative;padding-right:calc(10px + .7em + .7em)}.rtl .wcml-dropdown-click a.wcml-cs-item-toggle{padding-right:10px;padding-left:calc(10px + .7em + .7em)}.wcml-dropdown-click a.wcml-cs-item-toggle:after{content:'';vertical-align:middle;display:inline-block;border:.35em solid transparent;border-top:.5em solid;position:absolute;right:10px;top:calc(50% - .175em)}.rtl .wcml-dropdown-click a.wcml-cs-item-toggle:after{right:auto;left:10px}.wcml-dropdown-click .wcml-cs-submenu{visibility:hidden;position:absolute;top:100%;right:0;left:0;border-top:1px solid #cdcdcd;padding:0;margin:0 !important;list-style-type:none;z-index:101}.wcml-dropdown-click .wcml-cs-submenu li{padding:0;margin:0;border:solid #cdcdcd;border-width:0 1px 1px 1px}.woocommerce .wcml-dropdown-click.product{margin:1em 0}.widget .wcml-dropdown-click ul li{padding:0}.widget .wcml-dropdown-click ul li a{box-shadow:none}.widget .wcml-dropdown-click ul li a:hover{box-shadow:none;text-decoration:none}
1
+ .wcml-dropdown-click{width:15.5em;max-width:100%}.wcml-dropdown-click>ul{position:relative;padding:0;margin:0 !important;list-style-type:none}.wcml-dropdown-click li{list-style-type:none;padding:0;margin:0;border:1px solid #cdcdcd;background-color:#fff}.wcml-dropdown-click li:hover,.wcml-dropdown-click li:focus{background-color:#f5f5f5}.wcml-dropdown-click a{display:block;text-decoration:none;padding:.5em .5em .4em;line-height:1;box-shadow:none !important;cursor:pointer}.wcml-dropdown-click a:hover{box-shadow:none !important;text-decoration:none}.wcml-dropdown-click a.wcml-cs-item-toggle{position:relative;padding-right:calc(10px + .7em + .7em)}.rtl .wcml-dropdown-click a.wcml-cs-item-toggle{padding-right:10px;padding-left:calc(10px + .7em + .7em)}.wcml-dropdown-click a.wcml-cs-item-toggle:after{content:'';vertical-align:middle;display:inline-block;border:.35em solid transparent;border-top:.5em solid;position:absolute;right:10px;top:calc(50% - .175em)}.rtl .wcml-dropdown-click a.wcml-cs-item-toggle:after{right:auto;left:10px}.wcml-dropdown-click .wcml-cs-submenu{visibility:hidden;position:absolute;top:100%;right:0;left:0;border-top:1px solid #cdcdcd;padding:0;margin:0 !important;list-style-type:none;z-index:101}.wcml-dropdown-click .wcml-cs-submenu li{padding:0;margin:0;border:solid #cdcdcd;border-width:0 1px 1px 1px}.woocommerce .wcml-dropdown-click.product{margin:1em 0;overflow:visible}.widget .wcml-dropdown-click ul li{padding:0}.widget .wcml-dropdown-click ul li a{box-shadow:none}.widget .wcml-dropdown-click ul li a:hover{box-shadow:none;text-decoration:none}
templates/currency-switchers/legacy-dropdown-click/style.scss CHANGED
@@ -75,6 +75,7 @@
75
 
76
  .woocommerce &.product {
77
  margin: 1em 0;
 
78
  }
79
  .widget & {
80
  ul li {
75
 
76
  .woocommerce &.product {
77
  margin: 1em 0;
78
+ overflow: visible;
79
  }
80
  .widget & {
81
  ul li {
templates/currency-switchers/legacy-dropdown/style.css CHANGED
@@ -1 +1 @@
1
- .wcml-dropdown{width:15.5em;max-width:100%}.wcml-dropdown>ul{position:relative;padding:0;margin:0 !important;list-style-type:none}.wcml-dropdown li{list-style-type:none;padding:0;margin:0;border:1px solid #cdcdcd;background-color:#fff}.wcml-dropdown li:hover,.wcml-dropdown li:focus{background-color:#f5f5f5}.wcml-dropdown li:hover.wcml-cs-active-currency .wcml-cs-submenu,.wcml-dropdown li:focus.wcml-cs-active-currency .wcml-cs-submenu{visibility:visible}.wcml-dropdown a{display:block;text-decoration:none;padding:.5em .5em .4em;line-height:1;box-shadow:none !important;cursor:pointer}.wcml-dropdown a:hover{box-shadow:none !important;text-decoration:none}.wcml-dropdown a.wcml-cs-item-toggle{position:relative;padding-right:calc(10px + .7em + .7em)}.rtl .wcml-dropdown a.wcml-cs-item-toggle{padding-right:10px;padding-left:calc(10px + .7em + .7em)}.wcml-dropdown a.wcml-cs-item-toggle:after{content:'';vertical-align:middle;display:inline-block;border:.35em solid transparent;border-top:.5em solid;position:absolute;right:10px;top:calc(50% - .175em)}.rtl .wcml-dropdown a.wcml-cs-item-toggle:after{right:auto;left:10px}.wcml-dropdown .wcml-cs-submenu{visibility:hidden;position:absolute;top:100%;right:0;left:0;border-top:1px solid #cdcdcd;padding:0;margin:0 !important;list-style-type:none;z-index:101}.wcml-dropdown .wcml-cs-submenu li{padding:0;margin:0;border:solid #cdcdcd;border-width:0 1px 1px 1px}.woocommerce .wcml-dropdown.product{margin:1em 0}.widget .wcml-dropdown ul li{padding:0}.widget .wcml-dropdown ul li a{box-shadow:none}.widget .wcml-dropdown ul li a:hover{box-shadow:none;text-decoration:none}
1
+ .wcml-dropdown{width:15.5em;max-width:100%}.wcml-dropdown>ul{position:relative;padding:0;margin:0 !important;list-style-type:none}.wcml-dropdown li{list-style-type:none;padding:0;margin:0;border:1px solid #cdcdcd;background-color:#fff}.wcml-dropdown li:hover,.wcml-dropdown li:focus{background-color:#f5f5f5}.wcml-dropdown li:hover.wcml-cs-active-currency .wcml-cs-submenu,.wcml-dropdown li:focus.wcml-cs-active-currency .wcml-cs-submenu{visibility:visible}.wcml-dropdown a{display:block;text-decoration:none;padding:.5em .5em .4em;line-height:1;box-shadow:none !important;cursor:pointer}.wcml-dropdown a:hover{box-shadow:none !important;text-decoration:none}.wcml-dropdown a.wcml-cs-item-toggle{position:relative;padding-right:calc(10px + .7em + .7em)}.rtl .wcml-dropdown a.wcml-cs-item-toggle{padding-right:10px;padding-left:calc(10px + .7em + .7em)}.wcml-dropdown a.wcml-cs-item-toggle:after{content:'';vertical-align:middle;display:inline-block;border:.35em solid transparent;border-top:.5em solid;position:absolute;right:10px;top:calc(50% - .175em)}.rtl .wcml-dropdown a.wcml-cs-item-toggle:after{right:auto;left:10px}.wcml-dropdown .wcml-cs-submenu{visibility:hidden;position:absolute;top:100%;right:0;left:0;border-top:1px solid #cdcdcd;padding:0;margin:0 !important;list-style-type:none;z-index:101}.wcml-dropdown .wcml-cs-submenu li{padding:0;margin:0;border:solid #cdcdcd;border-width:0 1px 1px 1px}.woocommerce .wcml-dropdown.product{margin:1em 0;overflow:visible}.widget .wcml-dropdown ul li{padding:0}.widget .wcml-dropdown ul li a{box-shadow:none}.widget .wcml-dropdown ul li a:hover{box-shadow:none;text-decoration:none}
templates/currency-switchers/legacy-dropdown/style.scss CHANGED
@@ -78,6 +78,7 @@
78
 
79
  .woocommerce &.product {
80
  margin: 1em 0;
 
81
  }
82
  .widget & {
83
  ul li {
78
 
79
  .woocommerce &.product {
80
  margin: 1em 0;
81
+ overflow: visible;
82
  }
83
  .widget & {
84
  ul li {
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitba81b8b05211f8381283991a3f3afac5::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitb607dde9b5d8295faf917ebd1312c1e1::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInitec1210f07388b2b05ea7727304410095::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInit88b7ad9735ac37cb213cb9c6587b3e8d::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitba81b8b05211f8381283991a3f3afac5
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitba81b8b05211f8381283991a3f3afac5
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitba81b8b05211f8381283991a3f3afac5', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitba81b8b05211f8381283991a3f3afac5', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInitba81b8b05211f8381283991a3f3afac5::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitb607dde9b5d8295faf917ebd1312c1e1
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitb607dde9b5d8295faf917ebd1312c1e1', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitb607dde9b5d8295faf917ebd1312c1e1', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInitb607dde9b5d8295faf917ebd1312c1e1::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInitec1210f07388b2b05ea7727304410095 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitec1210f07388b2b05ea7727304410095 {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitec1210f07388b2b05ea7727304410095', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitec1210f07388b2b05ea7727304410095', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInit88b7ad9735ac37cb213cb9c6587b3e8d {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit88b7ad9735ac37cb213cb9c6587b3e8d', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit88b7ad9735ac37cb213cb9c6587b3e8d', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitba81b8b05211f8381283991a3f3afac5
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'C' =>
@@ -455,10 +455,10 @@ class ComposerStaticInitba81b8b05211f8381283991a3f3afac5
455
  public static function getInitializer(ClassLoader $loader)
456
  {
457
  return \Closure::bind(function () use ($loader) {
458
- $loader->prefixLengthsPsr4 = ComposerStaticInitba81b8b05211f8381283991a3f3afac5::$prefixLengthsPsr4;
459
- $loader->prefixDirsPsr4 = ComposerStaticInitba81b8b05211f8381283991a3f3afac5::$prefixDirsPsr4;
460
- $loader->prefixesPsr0 = ComposerStaticInitba81b8b05211f8381283991a3f3afac5::$prefixesPsr0;
461
- $loader->classMap = ComposerStaticInitba81b8b05211f8381283991a3f3afac5::$classMap;
462
 
463
  }, null, ClassLoader::class);
464
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitb607dde9b5d8295faf917ebd1312c1e1
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'C' =>
455
  public static function getInitializer(ClassLoader $loader)
456
  {
457
  return \Closure::bind(function () use ($loader) {
458
+ $loader->prefixLengthsPsr4 = ComposerStaticInitb607dde9b5d8295faf917ebd1312c1e1::$prefixLengthsPsr4;
459
+ $loader->prefixDirsPsr4 = ComposerStaticInitb607dde9b5d8295faf917ebd1312c1e1::$prefixDirsPsr4;
460
+ $loader->prefixesPsr0 = ComposerStaticInitb607dde9b5d8295faf917ebd1312c1e1::$prefixesPsr0;
461
+ $loader->classMap = ComposerStaticInitb607dde9b5d8295faf917ebd1312c1e1::$classMap;
462
 
463
  }, null, ClassLoader::class);
464
  }
wpml-woocommerce.php CHANGED
@@ -6,12 +6,12 @@
6
  Author: OnTheGoSystems
7
  Author URI: http://www.onthegosystems.com/
8
  Text Domain: woocommerce-multilingual
9
- Version: 4.1.1
10
  */
11
 
12
  if( defined( 'WCML_VERSION' ) ) return;
13
 
14
- define( 'WCML_VERSION', '4.1.1' );
15
  define( 'WCML_PLUGIN_PATH', dirname( __FILE__ ) );
16
  define( 'WCML_PLUGIN_FOLDER', basename( WCML_PLUGIN_PATH ) );
17
  define( 'WCML_LOCALE_PATH', WCML_PLUGIN_PATH . '/locale' );
6
  Author: OnTheGoSystems
7
  Author URI: http://www.onthegosystems.com/
8
  Text Domain: woocommerce-multilingual
9
+ Version: 4.1.2
10
  */
11
 
12
  if( defined( 'WCML_VERSION' ) ) return;
13
 
14
+ define( 'WCML_VERSION', '4.1.2' );
15
  define( 'WCML_PLUGIN_PATH', dirname( __FILE__ ) );
16
  define( 'WCML_PLUGIN_FOLDER', basename( WCML_PLUGIN_PATH ) );
17
  define( 'WCML_LOCALE_PATH', WCML_PLUGIN_PATH . '/locale' );