WooCommerce Checkout Manager - Version 5.1.4

Version Description

  • New: text field maxlength
  • New: textarea field maxlength
Download this release

Release Info

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

Code changes from version 5.1.3 to 5.1.4

includes/model/class-wooccm-field.php CHANGED
@@ -166,6 +166,8 @@ class WOOCCM_Field extends WOOCCM_Model
166
  'button_type' => '',
167
  'button_link' => '',
168
  'class' => array(),
 
 
169
  // Display
170
  // -------------------------------------------------------------------
171
  'show_cart_minimum' => 0,
@@ -382,7 +384,7 @@ class WOOCCM_Field extends WOOCCM_Model
382
 
383
  if (is_array($field['options']) && count($field['options']) > 1) {
384
  uasort($field['options'], array(__CLASS__, 'order_fields'));
385
- }
386
 
387
  return wp_unslash($field);
388
  }
166
  'button_type' => '',
167
  'button_link' => '',
168
  'class' => array(),
169
+ // Input/Textarea
170
+ 'maxlength' => null,
171
  // Display
172
  // -------------------------------------------------------------------
173
  'show_cart_minimum' => 0,
384
 
385
  if (is_array($field['options']) && count($field['options']) > 1) {
386
  uasort($field['options'], array(__CLASS__, 'order_fields'));
387
+ }
388
 
389
  return wp_unslash($field);
390
  }
includes/view/backend/pages/modals/parts/panel-general.php CHANGED
@@ -133,6 +133,13 @@
133
  </p>
134
  <# } #>
135
 
 
 
 
 
 
 
 
136
  <# if (data.type == 'file') { #>
137
  <!--<div class="options_group">
138
  <p class="form-field">
133
  </p>
134
  <# } #>
135
 
136
+ <# if ( data.type == 'text' || data.type == 'textarea') { #>
137
+ <p class="form-field dimensions_field">
138
+ <label><?php esc_html_e('Maxlength', 'woocommerce-checkout-manager'); ?></label>
139
+ <input class="short" type="text" name="maxlength" placeholder="<?php esc_html_e('Enter a maxlength value (optional)', 'woocommerce-checkout-manager'); ?>" value="{{data.maxlength}}">
140
+ </p>
141
+ <# } #>
142
+
143
  <# if (data.type == 'file') { #>
144
  <!--<div class="options_group">
145
  <p class="form-field">
includes/view/frontend/class-wooccm-fields-handler.php CHANGED
@@ -203,6 +203,13 @@ class WOOCCM_Fields_Handler
203
  }
204
  }
205
 
 
 
 
 
 
 
 
206
  return $field;
207
  }
208
 
203
  }
204
  }
205
 
206
+ // Text/Textarea
207
+ if ($field['type'] == 'text' || $field['type'] == 'textarea') {
208
+ if ($field['maxlength']) {
209
+ $field['custom_attributes']['maxlength'] = (int) $field['maxlength'];
210
+ }
211
+ }
212
+
213
  return $field;
214
  }
215
 
readme.txt CHANGED
@@ -4,9 +4,9 @@ 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.1.3
8
  WC requires at least: 3.1.0
9
- WC tested up to: 4.2.0
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
 
@@ -107,6 +107,10 @@ Your Order data can be reviewed in each order within the default WooCommerce Ord
107
 
108
  == Changelog ==
109
 
 
 
 
 
110
  = 5.1.3 =
111
  * Fix: date picker documentation
112
 
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.1.4
8
  WC requires at least: 3.1.0
9
+ WC tested up to: 4.3.0
10
  License: GPLv3
11
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
 
107
 
108
  == Changelog ==
109
 
110
+ = 5.1.4 =
111
+ * New: text field maxlength
112
+ * New: textarea field maxlength
113
+
114
  = 5.1.3 =
115
  * Fix: date picker documentation
116
 
woocommerce-checkout-manager.php CHANGED
@@ -4,13 +4,13 @@
4
  * Plugin Name: Checkout Manager for WooCommerce
5
  * Plugin URI: https://quadlayers.com/portfolio/woocommerce-checkout-manager/
6
  * Description: Manages WooCommerce Checkout, the advanced way.
7
- * Version: 5.1.3
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
11
  * Text Domain: woocommerce-checkout-manager
12
  * WC requires at least: 3.1.0
13
- * WC tested up to: 4.2.0
14
  */
15
  if (!defined('ABSPATH')) {
16
  die('-1');
@@ -20,7 +20,7 @@ if (!defined('WOOCCM_PLUGIN_NAME')) {
20
  define('WOOCCM_PLUGIN_NAME', 'Checkout Manager for WooCommerce');
21
  }
22
  if (!defined('WOOCCM_PLUGIN_VERSION')) {
23
- define('WOOCCM_PLUGIN_VERSION', '5.1.3');
24
  }
25
  if (!defined('WOOCCM_PLUGIN_FILE')) {
26
  define('WOOCCM_PLUGIN_FILE', __FILE__);
4
  * Plugin Name: Checkout Manager for WooCommerce
5
  * Plugin URI: https://quadlayers.com/portfolio/woocommerce-checkout-manager/
6
  * Description: Manages WooCommerce Checkout, the advanced way.
7
+ * Version: 5.1.4
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
11
  * Text Domain: woocommerce-checkout-manager
12
  * WC requires at least: 3.1.0
13
+ * WC tested up to: 4.3.0
14
  */
15
  if (!defined('ABSPATH')) {
16
  die('-1');
20
  define('WOOCCM_PLUGIN_NAME', 'Checkout Manager for WooCommerce');
21
  }
22
  if (!defined('WOOCCM_PLUGIN_VERSION')) {
23
+ define('WOOCCM_PLUGIN_VERSION', '5.1.4');
24
  }
25
  if (!defined('WOOCCM_PLUGIN_FILE')) {
26
  define('WOOCCM_PLUGIN_FILE', __FILE__);