WooCommerce Checkout Manager - Version 5.0.9

Version Description

  • Fix: woocommerce checkout manager edit billing & shipping
Download this release

Release Info

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

Code changes from version 5.0.8 to 5.0.9

includes/controller/class-wooccm-field-billing.php CHANGED
@@ -10,11 +10,11 @@ class WOOCCM_Field_Controller_Billing extends WOOCCM_Field_Controller
10
  {
11
 
12
  include_once(WOOCCM_PLUGIN_DIR . 'includes/model/class-wooccm-field-billing.php');
13
-
14
  add_action('wooccm_sections_header', array($this, 'add_header'));
15
  add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section'), 99);
16
  add_filter('woocommerce_admin_billing_fields', array($this, 'add_admin_billing_fields'));
17
- add_filter('woocommerce_admin_shipping_fields', array($this, 'add_admin_shipping_fields'));
18
  // add_action('woocommerce_admin_order_data_after_billing_address', array($this, 'add_order_data'));
19
  }
20
 
@@ -81,21 +81,24 @@ class WOOCCM_Field_Controller_Billing extends WOOCCM_Field_Controller
81
  continue;
82
  }
83
 
84
- $billing_fields[$field['name']] = $field;
 
 
85
 
 
86
  $billing_fields[$field['name']]['id'] = sprintf('_%s', (string) $field['key']);
87
  $billing_fields[$field['name']]['label'] = $field['label'];
88
  $billing_fields[$field['name']]['name'] = $field['key'];
89
  $billing_fields[$field['name']]['value'] = null;
90
  $billing_fields[$field['name']]['class'] = join(' ', $field['class']);
91
- $billing_fields[$field['name']]['wrapper_class'] = 'wooccm-premium';
92
  }
93
 
94
 
95
  return $billing_fields;
96
  }
97
 
98
- function add_admin_shipping_fields($shipping_fields)
99
  {
100
 
101
  if (!$fields = WOOCCM()->shipping->get_fields()) {
@@ -125,12 +128,12 @@ class WOOCCM_Field_Controller_Billing extends WOOCCM_Field_Controller
125
  $shipping_fields[$field['name']]['name'] = $field['key'];
126
  $shipping_fields[$field['name']]['value'] = null;
127
  $shipping_fields[$field['name']]['class'] = join(' ', $field['class']);
128
- $shipping_fields[$field['name']]['wrapper_class'] = 'wooccm-premium';
129
  }
130
 
131
 
132
  return $shipping_fields;
133
- }
134
 
135
  /*function add_order_data($order)
136
  {
10
  {
11
 
12
  include_once(WOOCCM_PLUGIN_DIR . 'includes/model/class-wooccm-field-billing.php');
13
+
14
  add_action('wooccm_sections_header', array($this, 'add_header'));
15
  add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section'), 99);
16
  add_filter('woocommerce_admin_billing_fields', array($this, 'add_admin_billing_fields'));
17
+ //add_filter('woocommerce_admin_shipping_fields', array($this, 'add_admin_shipping_fields'));
18
  // add_action('woocommerce_admin_order_data_after_billing_address', array($this, 'add_order_data'));
19
  }
20
 
81
  continue;
82
  }
83
 
84
+ if (!isset($field['type']) || $field['type'] != 'textarea') {
85
+ $field['type'] = 'text';
86
+ }
87
 
88
+ $billing_fields[$field['name']] = $field;
89
  $billing_fields[$field['name']]['id'] = sprintf('_%s', (string) $field['key']);
90
  $billing_fields[$field['name']]['label'] = $field['label'];
91
  $billing_fields[$field['name']]['name'] = $field['key'];
92
  $billing_fields[$field['name']]['value'] = null;
93
  $billing_fields[$field['name']]['class'] = join(' ', $field['class']);
94
+ //$billing_fields[$field['name']]['wrapper_class'] = 'wooccm-premium';
95
  }
96
 
97
 
98
  return $billing_fields;
99
  }
100
 
101
+ /*function add_admin_shipping_fields($shipping_fields)
102
  {
103
 
104
  if (!$fields = WOOCCM()->shipping->get_fields()) {
128
  $shipping_fields[$field['name']]['name'] = $field['key'];
129
  $shipping_fields[$field['name']]['value'] = null;
130
  $shipping_fields[$field['name']]['class'] = join(' ', $field['class']);
131
+ //$shipping_fields[$field['name']]['wrapper_class'] = 'wooccm-premium';
132
  }
133
 
134
 
135
  return $shipping_fields;
136
+ }*/
137
 
138
  /*function add_order_data($order)
139
  {
includes/controller/class-wooccm-field-shipping.php CHANGED
@@ -12,6 +12,8 @@ class WOOCCM_Field_Controller_Shipping extends WOOCCM_Field_Controller
12
 
13
  add_action('wooccm_sections_header', array($this, 'add_header'));
14
  add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section'), 99);
 
 
15
  //add_action('woocommerce_admin_order_data_after_shipping_address', array($this, 'add_order_data'));
16
  }
17
 
@@ -31,7 +33,7 @@ class WOOCCM_Field_Controller_Shipping extends WOOCCM_Field_Controller
31
  global $current_section;
32
  ?>
33
  <li><a href="<?php echo admin_url('admin.php?page=wc-settings&tab=wooccm&section=shipping'); ?>" class="<?php echo ($current_section == 'shipping' ? 'current' : ''); ?>"><?php esc_html_e('Shipping', 'woocommerce-checkout-manager'); ?></a> | </li>
34
- <?php
35
  }
36
 
37
  public function add_section()
@@ -55,10 +57,47 @@ class WOOCCM_Field_Controller_Shipping extends WOOCCM_Field_Controller
55
  }
56
  }
57
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
58
  // Admin Order
59
  // ---------------------------------------------------------------------------
60
 
61
- function add_order_data($order)
62
  {
63
 
64
  if ($fields = WOOCCM()->shipping->get_fields()) {
@@ -85,7 +124,7 @@ class WOOCCM_Field_Controller_Shipping extends WOOCCM_Field_Controller
85
  }
86
  }
87
  }
88
- }
89
  }
90
 
91
  WOOCCM_Field_Controller_Shipping::instance();
12
 
13
  add_action('wooccm_sections_header', array($this, 'add_header'));
14
  add_action('woocommerce_sections_' . WOOCCM_PREFIX, array($this, 'add_section'), 99);
15
+ add_filter('woocommerce_admin_shipping_fields', array($this, 'add_admin_shipping_fields'));
16
+
17
  //add_action('woocommerce_admin_order_data_after_shipping_address', array($this, 'add_order_data'));
18
  }
19
 
33
  global $current_section;
34
  ?>
35
  <li><a href="<?php echo admin_url('admin.php?page=wc-settings&tab=wooccm&section=shipping'); ?>" class="<?php echo ($current_section == 'shipping' ? 'current' : ''); ?>"><?php esc_html_e('Shipping', 'woocommerce-checkout-manager'); ?></a> | </li>
36
+ <?php
37
  }
38
 
39
  public function add_section()
57
  }
58
  }
59
 
60
+ function add_admin_shipping_fields($shipping_fields)
61
+ {
62
+
63
+ if (!$fields = WOOCCM()->shipping->get_fields()) {
64
+ return $shipping_fields;
65
+ }
66
+
67
+ $defaults = WOOCCM()->shipping->get_defaults();
68
+ $template = WOOCCM()->shipping->get_template_types();
69
+
70
+ foreach ($fields as $field_id => $field) {
71
+
72
+ if (in_array($field['name'], $defaults)) {
73
+ continue;
74
+ }
75
+
76
+ if (in_array($field['name'], $template)) {
77
+ continue;
78
+ }
79
+
80
+ if (!isset($field['type']) || $field['type'] != 'textarea') {
81
+ $field['type'] = 'text';
82
+ }
83
+
84
+ $shipping_fields[$field['name']] = $field;
85
+ $shipping_fields[$field['name']]['id'] = sprintf('_%s', (string) $field['key']);
86
+ $shipping_fields[$field['name']]['label'] = $field['label'];
87
+ $shipping_fields[$field['name']]['name'] = $field['key'];
88
+ $shipping_fields[$field['name']]['value'] = null;
89
+ $shipping_fields[$field['name']]['class'] = join(' ', $field['class']);
90
+ //$shipping_fields[$field['name']]['wrapper_class'] = 'wooccm-premium';
91
+ }
92
+
93
+
94
+ return $shipping_fields;
95
+ }
96
+
97
  // Admin Order
98
  // ---------------------------------------------------------------------------
99
 
100
+ /*function add_order_data($order)
101
  {
102
 
103
  if ($fields = WOOCCM()->shipping->get_fields()) {
124
  }
125
  }
126
  }
127
+ }*/
128
  }
129
 
130
  WOOCCM_Field_Controller_Shipping::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.4
6
  Tested up to: 5.4.2
7
- Stable tag: 5.0.8
8
  WC requires at least: 3.1.0
9
  WC tested up to: 4.2.0
10
  License: GPLv2 or later
@@ -107,6 +107,9 @@ Your Order data can be reviewed in each order within the default WooCommerce Ord
107
 
108
  == Changelog ==
109
 
 
 
 
110
  = 5.0.7 =
111
  * Improvement: woocommerce checkout manager
112
  * Improvement: woocommerce checkout number field type
4
  Tags: woocommerce, woocommerce checkout, field manager, checkout editor, checkout field, shipping field, billing field, order field, additional field
5
  Requires at least: 3.4
6
  Tested up to: 5.4.2
7
+ Stable tag: 5.0.9
8
  WC requires at least: 3.1.0
9
  WC tested up to: 4.2.0
10
  License: GPLv2 or later
107
 
108
  == Changelog ==
109
 
110
+ = 5.0.9 =
111
+ * Fix: woocommerce checkout manager edit billing & shipping
112
+
113
  = 5.0.7 =
114
  * Improvement: woocommerce checkout manager
115
  * Improvement: woocommerce checkout number field type
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: 5.0.8
7
  * Author: QuadLayers
8
  * Author URI: https://www.quadlayers.com
9
  * Copyright: 2019 QuadLayers (https://www.quadlayers.com)
@@ -19,7 +19,7 @@ if (!defined('WOOCCM_PLUGIN_NAME')) {
19
  define('WOOCCM_PLUGIN_NAME', 'WooCommerce Checkout Manager');
20
  }
21
  if (!defined('WOOCCM_PLUGIN_VERSION')) {
22
- define('WOOCCM_PLUGIN_VERSION', '5.0.8');
23
  }
24
  if (!defined('WOOCCM_PLUGIN_FILE')) {
25
  define('WOOCCM_PLUGIN_FILE', __FILE__);
@@ -52,7 +52,7 @@ if (!defined('WOOCCM_GROUP_URL')) {
52
  define('WOOCCM_GROUP_URL', 'https://www.facebook.com/groups/quadlayers');
53
  }
54
  if (!defined('WOOCCM_DEVELOPER')) {
55
- define('WOOCCM_DEVELOPER', true);
56
  }
57
 
58
  if (!class_exists('WOOCCM', false)) {
3
  /**
4
  * Plugin Name: WooCommerce Checkout Manager
5
  * Description: Manages WooCommerce Checkout, the advanced way.
6
+ * Version: 5.0.9
7
  * Author: QuadLayers
8
  * Author URI: https://www.quadlayers.com
9
  * Copyright: 2019 QuadLayers (https://www.quadlayers.com)
19
  define('WOOCCM_PLUGIN_NAME', 'WooCommerce Checkout Manager');
20
  }
21
  if (!defined('WOOCCM_PLUGIN_VERSION')) {
22
+ define('WOOCCM_PLUGIN_VERSION', '5.0.9');
23
  }
24
  if (!defined('WOOCCM_PLUGIN_FILE')) {
25
  define('WOOCCM_PLUGIN_FILE', __FILE__);
52
  define('WOOCCM_GROUP_URL', 'https://www.facebook.com/groups/quadlayers');
53
  }
54
  if (!defined('WOOCCM_DEVELOPER')) {
55
+ define('WOOCCM_DEVELOPER', false);
56
  }
57
 
58
  if (!class_exists('WOOCCM', false)) {