WooCommerce Checkout Manager - Version 4.6.9

Version Description

  • Fix: fix wpml compatibility
Download this release

Release Info

Developer quadlayers
Plugin Icon 128x128 WooCommerce Checkout Manager
Version 4.6.9
Comparing to
See all releases

Code changes from version 4.6.7 to 4.6.9

includes/controller/class-wooccm-field.php CHANGED
@@ -582,6 +582,7 @@ class WOOCCM_Field_Controller {
582
  include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-display.php' );
583
  include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-conditional.php' );
584
  include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-handler.php' );
 
585
  include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-filters.php' );
586
  }
587
  }
582
  include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-display.php' );
583
  include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-conditional.php' );
584
  include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-handler.php' );
585
+ include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-i18n.php' );
586
  include_once( WOOCCM_PLUGIN_DIR . 'includes/view/frontend/class-wooccm-fields-filters.php' );
587
  }
588
  }
includes/model/class-wooccm-field.php CHANGED
@@ -294,25 +294,6 @@ class WOOCCM_Field {
294
  return $value;
295
  }
296
 
297
- public function get_wpml_string($value) {
298
-
299
- if (!empty($value) && function_exists('icl_t')) {
300
-
301
- if (is_array($value)) {
302
-
303
- foreach ($value as $key => $name) {
304
- $value[$key] = icl_t(WOOCCM_PLUGIN_NAME, $name, $name);
305
- }
306
- }
307
-
308
- if (is_string($value)) {
309
- $value = icl_t(WOOCCM_PLUGIN_NAME, $value, $value);
310
- }
311
- }
312
-
313
- return $value;
314
- }
315
-
316
  public function get_defaults() {
317
  return $this->defaults;
318
  }
294
  return $value;
295
  }
296
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  public function get_defaults() {
298
  return $this->defaults;
299
  }
includes/view/backend/pages/premium.php CHANGED
@@ -58,8 +58,7 @@
58
  </div>
59
  </div>
60
  <div class="column">
61
- <br/>
62
- <img src="<?php echo plugins_url('/assets/backend/img/admin.png', WOOCCM_PLUGIN_FILE); ?>">
63
  </div>
64
  </div>
65
  </div>
58
  </div>
59
  </div>
60
  <div class="column">
61
+ <img style="margin-top: -30px" src="<?php echo plugins_url('/assets/backend/img/admin.png', WOOCCM_PLUGIN_FILE); ?>">
 
62
  </div>
63
  </div>
64
  </div>
includes/view/frontend/class-wooccm-fields-handler.php CHANGED
@@ -108,12 +108,6 @@ class WOOCCM_Fields_Handler {
108
  $field['priority'] = $field['order'] * 10;
109
  }
110
 
111
- // ii18n
112
- // -----------------------------------------------------------------------
113
-
114
- $field['label'] = esc_html__($field['label'], WOOCCM_WC_DOMAIN);
115
- $field['placeholder'] = esc_html__($field['placeholder'], WOOCCM_WC_DOMAIN);
116
-
117
  $session_data['fields'][$field['key']] = $field;
118
 
119
  WC()->session->wooccm = $session_data;
108
  $field['priority'] = $field['order'] * 10;
109
  }
110
 
 
 
 
 
 
 
111
  $session_data['fields'][$field['key']] = $field;
112
 
113
  WC()->session->wooccm = $session_data;
includes/view/frontend/class-wooccm-fields-i18n.php ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class WOOCCM_Fields_i18n {
4
+
5
+ protected static $_instance;
6
+ protected static $domain = 'woocommerce';
7
+
8
+ public function __construct() {
9
+ $this->init();
10
+ }
11
+
12
+ public static function instance() {
13
+ if (is_null(self::$_instance)) {
14
+ self::$_instance = new self();
15
+ }
16
+ return self::$_instance;
17
+ }
18
+
19
+ public function i18n($string) {
20
+
21
+ if (function_exists('icl_t')) {
22
+ return icl_t(WOOCCM_PLUGIN_NAME, $string, $string);
23
+ }
24
+
25
+ return esc_html__($string, self::$domain);
26
+ }
27
+
28
+ public function translate($value) {
29
+
30
+ if (!empty($value)) {
31
+
32
+ if (is_array($value)) {
33
+ foreach ($value as $key => $name) {
34
+ if (is_string($name)) {
35
+ $value[$key] = $this->i18n($name);
36
+ }
37
+ }
38
+ }
39
+
40
+ if (is_string($value)) {
41
+ $value = $this->i18n($value);
42
+ }
43
+ }
44
+
45
+ return $value;
46
+ }
47
+
48
+ public function translate_field($field) {
49
+
50
+ // ii18n
51
+ // -----------------------------------------------------------------------
52
+
53
+ if (!empty($field['label'])) {
54
+ $field['label'] = $this->translate($field['label']);
55
+ }
56
+
57
+ if (!empty($field['placeholder'])) {
58
+ $field['placeholder'] = $this->translate($field['placeholder']);
59
+ }
60
+
61
+ return $field;
62
+ }
63
+
64
+ public function init() {
65
+ add_filter('wooccm_checkout_field_filter', array($this, 'translate_field'));
66
+ }
67
+
68
+ }
69
+
70
+ WOOCCM_Fields_i18n::instance();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://quadlayers.com/
4
  Tags: woocommerce, woocommerce checkout, field manager, checkout editor, checkout field, shipping field, billing field, order field, additional field
5
  Requires at least: 3.0
6
  Tested up to: 5.2.4
7
- Stable tag: 4.6.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -99,6 +99,12 @@ Your Order data can be reviewed in each order within the default WooCommerce Ord
99
 
100
  == Changelog ==
101
 
 
 
 
 
 
 
102
  = 4.6.7 =
103
  * Fix: premium compatibility
104
 
4
  Tags: woocommerce, woocommerce checkout, field manager, checkout editor, checkout field, shipping field, billing field, order field, additional field
5
  Requires at least: 3.0
6
  Tested up to: 5.2.4
7
+ Stable tag: 4.6.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
99
 
100
  == Changelog ==
101
 
102
+ = 4.6.9 =
103
+ * Fix: fix wpml compatibility
104
+
105
+ = 4.6.8 =
106
+ * Fix: fix wpml compatibility
107
+
108
  = 4.6.7 =
109
  * Fix: premium compatibility
110
 
woocommerce-checkout-manager.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Plugin Name: WooCommerce Checkout Manager
5
  * Description: Manages WooCommerce Checkout, the advanced way.
6
- * Version: 4.6.7
7
  * Author: QuadLayers
8
  * Author URI: https://www.quadlayers.com
9
  * Copyright: 2019 QuadLayers (https://www.quadlayers.com)
@@ -17,7 +17,7 @@ if (!defined('WOOCCM_PLUGIN_NAME')) {
17
  define('WOOCCM_PLUGIN_NAME', 'WooCommerce Checkout Manager');
18
  }
19
  if (!defined('WOOCCM_PLUGIN_VERSION')) {
20
- define('WOOCCM_PLUGIN_VERSION', '4.6.7');
21
  }
22
  if (!defined('WOOCCM_PLUGIN_FILE')) {
23
  define('WOOCCM_PLUGIN_FILE', __FILE__);
@@ -50,10 +50,6 @@ if (!defined('WOOCCM_GROUP_URL')) {
50
  define('WOOCCM_GROUP_URL', 'https://www.facebook.com/groups/quadlayers');
51
  }
52
 
53
- if (!defined('WOOCCM_WC_DOMAIN')) {
54
- define('WOOCCM_WC_DOMAIN', 'woocommerce');
55
- }
56
-
57
  if (!class_exists('WOOCCM', false)) {
58
  include_once( WOOCCM_PLUGIN_DIR . 'includes/class-wooccm.php' );
59
  }
3
  /**
4
  * Plugin Name: WooCommerce Checkout Manager
5
  * Description: Manages WooCommerce Checkout, the advanced way.
6
+ * Version: 4.6.9
7
  * Author: QuadLayers
8
  * Author URI: https://www.quadlayers.com
9
  * Copyright: 2019 QuadLayers (https://www.quadlayers.com)
17
  define('WOOCCM_PLUGIN_NAME', 'WooCommerce Checkout Manager');
18
  }
19
  if (!defined('WOOCCM_PLUGIN_VERSION')) {
20
+ define('WOOCCM_PLUGIN_VERSION', '4.6.9');
21
  }
22
  if (!defined('WOOCCM_PLUGIN_FILE')) {
23
  define('WOOCCM_PLUGIN_FILE', __FILE__);
50
  define('WOOCCM_GROUP_URL', 'https://www.facebook.com/groups/quadlayers');
51
  }
52
 
 
 
 
 
53
  if (!class_exists('WOOCCM', false)) {
54
  include_once( WOOCCM_PLUGIN_DIR . 'includes/class-wooccm.php' );
55
  }