WooCommerce Checkout Manager - Version 4.5.6

Version Description

  • Fix: woocommerce settings page permissions
Download this release

Release Info

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

Code changes from version 4.5.7 to 4.5.6

new/model/class-wooccm-field-billing.php CHANGED
@@ -4,7 +4,6 @@ if (!class_exists('WOOCCM_Field_Billing')) {
4
 
5
  class WOOCCM_Field_Billing extends WOOCCM_Field_Compatibility {
6
 
7
- protected $fields = null;
8
  protected static $_instance;
9
  protected $prefix = 'billing';
10
  protected $option_name = 'wccs_settings3';
4
 
5
  class WOOCCM_Field_Billing extends WOOCCM_Field_Compatibility {
6
 
 
7
  protected static $_instance;
8
  protected $prefix = 'billing';
9
  protected $option_name = 'wccs_settings3';
new/model/class-wooccm-field-old.php CHANGED
@@ -2,7 +2,6 @@
2
 
3
  class WOOCCM_Field_Compatibility extends WOOCCM_Field {
4
 
5
- protected $fields = null;
6
  protected $prefix = '';
7
  protected $option_name = '';
8
  protected $defaults = array();
@@ -255,47 +254,6 @@ class WOOCCM_Field_Compatibility extends WOOCCM_Field {
255
  return $type;
256
  }
257
 
258
- function register_wpml_string($value) {
259
-
260
- if (!empty($value) && function_exists('icl_register_string')) {
261
-
262
- if (is_array($value)) {
263
-
264
- foreach ($value as $key => $name) {
265
- icl_register_string(WOOCCM_PLUGIN_NAME, $name, $name);
266
- }
267
-
268
- return $value;
269
- }
270
-
271
- if (is_string($value)) {
272
- icl_register_string(WOOCCM_PLUGIN_NAME, $value, $value);
273
- return $value;
274
- }
275
- }
276
-
277
- return $value;
278
- }
279
-
280
- function get_wpml_string($value) {
281
-
282
- if (!empty($value) && function_exists('icl_t')) {
283
-
284
- if (is_array($value)) {
285
-
286
- foreach ($value as $key => $name) {
287
- $value[$key] = icl_t(WOOCCM_PLUGIN_NAME, $name, $name);
288
- }
289
- }
290
-
291
- if (is_string($value)) {
292
- $value = icl_t(WOOCCM_PLUGIN_NAME, $value, $value);
293
- }
294
- }
295
-
296
- return $value;
297
- }
298
-
299
  function new_panel_compatibility($field_id, $field = array(), $fields = array()) {
300
 
301
  $field = $this->get_new_args($field);
@@ -441,19 +399,11 @@ class WOOCCM_Field_Compatibility extends WOOCCM_Field {
441
 
442
  public function get_fields($old = false) {
443
 
444
- if (!is_null($this->fields)) {
445
- return $this->fields;
446
- }
447
-
448
  if ($old) {
449
- $this->fields = $this->get_fields_old();
450
  } else {
451
- $this->fields = $this->get_fields_new();
452
  }
453
- // Resort the fields by order
454
- uasort($this->fields, array(__CLASS__, 'order_fields'));
455
-
456
- return $this->fields;
457
  }
458
 
459
  protected function get_fields_old() {
@@ -593,8 +543,6 @@ class WOOCCM_Field_Compatibility extends WOOCCM_Field {
593
 
594
  protected function get_option($defaults = array()) {
595
 
596
- error_log('get_option');
597
-
598
  if ($fields = get_option($this->option_name, $defaults)) {
599
 
600
  // Compatibility with 4.x
@@ -610,6 +558,9 @@ class WOOCCM_Field_Compatibility extends WOOCCM_Field {
610
  }
611
  }
612
 
 
 
 
613
  return $fields;
614
  }
615
 
2
 
3
  class WOOCCM_Field_Compatibility extends WOOCCM_Field {
4
 
 
5
  protected $prefix = '';
6
  protected $option_name = '';
7
  protected $defaults = array();
254
  return $type;
255
  }
256
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  function new_panel_compatibility($field_id, $field = array(), $fields = array()) {
258
 
259
  $field = $this->get_new_args($field);
399
 
400
  public function get_fields($old = false) {
401
 
 
 
 
 
402
  if ($old) {
403
+ return $this->get_fields_old();
404
  } else {
405
+ return $this->get_fields_new();
406
  }
 
 
 
 
407
  }
408
 
409
  protected function get_fields_old() {
543
 
544
  protected function get_option($defaults = array()) {
545
 
 
 
546
  if ($fields = get_option($this->option_name, $defaults)) {
547
 
548
  // Compatibility with 4.x
558
  }
559
  }
560
 
561
+ // Resort the fields by order
562
+ uasort($fields, array(__CLASS__, 'order_fields'));
563
+
564
  return $fields;
565
  }
566
 
new/model/class-wooccm-field.php CHANGED
@@ -2,7 +2,6 @@
2
 
3
  class WOOCCM_Field {
4
 
5
- protected $fields = null;
6
  protected $prefix = '';
7
  protected $option_name = '';
8
  protected $defaults = array();
2
 
3
  class WOOCCM_Field {
4
 
 
5
  protected $prefix = '';
6
  protected $option_name = '';
7
  protected $defaults = array();
new/view/frontend/class-wooccm-fields-register.php CHANGED
@@ -145,11 +145,7 @@ if (!class_exists('WOOCCM_Fields_Register')) {
145
  }
146
  }
147
 
148
- // ii18n
149
- // -----------------------------------------------------------------------
150
-
151
- $fields[$key]['label'] = esc_html__($fields[$key]['label'], WOOCCM_WC_DOMAIN);
152
- $fields[$key]['placeholder'] = esc_html__($fields[$key]['placeholder'], WOOCCM_WC_DOMAIN);
153
 
154
  return apply_filters('wooccm_checkout_field_filter', $fields[$key], $key);
155
  }
145
  }
146
  }
147
 
148
+ //error_log(json_encode($fields[$key]));
 
 
 
 
149
 
150
  return apply_filters('wooccm_checkout_field_filter', $fields[$key], $key);
151
  }
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.3
7
- Stable tag: 4.5.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -137,9 +137,6 @@ Example:
137
 
138
  == Changelog ==
139
 
140
- = 4.5.7 =
141
- * Fix: woocommerce default label and placeholder i18n
142
-
143
  = 4.5.6 =
144
  * Fix: woocommerce settings page permissions
145
 
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.3
7
+ Stable tag: 4.5.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
137
 
138
  == Changelog ==
139
 
 
 
 
140
  = 4.5.6 =
141
  * Fix: woocommerce settings page permissions
142
 
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.5.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.5.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 . 'new/class-wooccm.php';
59
  }
3
  /**
4
  * Plugin Name: WooCommerce Checkout Manager
5
  * Description: Manages WooCommerce Checkout, the advanced way.
6
+ * Version: 4.5.6
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.5.6');
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 . 'new/class-wooccm.php';
55
  }