WooCommerce Checkout Manager - Version 4.5.5

Version Description

  • Fix: woocommerce default phone and email missing
Download this release

Release Info

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

Code changes from version 4.5.4 to 4.5.5

new/model/class-wooccm-field-old.php CHANGED
@@ -147,23 +147,6 @@ class WOOCCM_Field_Compatibility extends WOOCCM_Field {
147
  'changename',
148
  );
149
 
150
- public function get_default_fields() {
151
-
152
- $fields = array();
153
-
154
- if ($this->prefix) {
155
-
156
- foreach (WC()->countries->get_address_fields('', $this->prefix) as $key => $field) {
157
-
158
- $field['name'] = str_replace($this->prefix, '', $key);
159
-
160
- $fields[] = $field;
161
- }
162
- }
163
-
164
- return $fields;
165
- }
166
-
167
  function replace_keys($array = array(), $replace = array()) {
168
 
169
  foreach ($array as $key => $value) {
147
  'changename',
148
  );
149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  function replace_keys($array = array(), $replace = array()) {
151
 
152
  foreach ($array as $key => $value) {
new/model/class-wooccm-field.php CHANGED
@@ -147,6 +147,32 @@ class WOOCCM_Field {
147
  );
148
  }
149
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  public function get_defaults() {
151
  return $this->defaults;
152
  }
147
  );
148
  }
149
 
150
+ public function get_default_fields() {
151
+
152
+ $fields = array();
153
+
154
+ if ($this->prefix) {
155
+
156
+ $prefix = sprintf('%s_', $this->prefix);
157
+
158
+ $filters = WOOCCM_Fields_Register::instance();
159
+
160
+ //fix nesting level
161
+ remove_filter('woocommerce_' . $prefix . 'fields', array($filters, 'add_checkout_' . $prefix . 'fields'));
162
+
163
+ foreach (WC()->countries->get_address_fields('', $prefix) as $key => $field) {
164
+
165
+ $field['name'] = str_replace($prefix, '', $key);
166
+
167
+ $fields[] = $field;
168
+ }
169
+ }
170
+
171
+ //error_log(json_encode($fields));
172
+
173
+ return $fields;
174
+ }
175
+
176
  public function get_defaults() {
177
  return $this->defaults;
178
  }
readme.txt CHANGED
@@ -137,6 +137,9 @@ Example:
137
 
138
  == Changelog ==
139
 
 
 
 
140
  = 4.5.4 =
141
  * Improvement: woocommerce order fields rebuilt
142
  * Fix: woocommerce conditional fields required
137
 
138
  == Changelog ==
139
 
140
+ = 4.5.5 =
141
+ * Fix: woocommerce default phone and email missing
142
+
143
  = 4.5.4 =
144
  * Improvement: woocommerce order fields rebuilt
145
  * Fix: woocommerce conditional fields required
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.4
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.4');
21
  }
22
  if (!defined('WOOCCM_PLUGIN_FILE')) {
23
  define('WOOCCM_PLUGIN_FILE', __FILE__);
3
  /**
4
  * Plugin Name: WooCommerce Checkout Manager
5
  * Description: Manages WooCommerce Checkout, the advanced way.
6
+ * Version: 4.5.5
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.5');
21
  }
22
  if (!defined('WOOCCM_PLUGIN_FILE')) {
23
  define('WOOCCM_PLUGIN_FILE', __FILE__);