Flexible Checkout Fields for WooCommerce – WooCommerce Checkout Manager - Version 1.5.7

Version Description

  • 2017-12-14 =
  • Fixed issue with changing name and placeholder for core WooCommerce fields
  • Fixed displaying field name when it's removed
Download this release

Release Info

Developer wpdesk
Plugin Icon wp plugin Flexible Checkout Fields for WooCommerce – WooCommerce Checkout Manager
Version 1.5.7
Comparing to
See all releases

Code changes from version 1.5.6 to 1.5.7

class/views/settings-fields.php CHANGED
@@ -248,7 +248,7 @@ $checkout_field_type = $args['plugin']->get_fields();
248
  }
249
  ?>
250
 
251
- <textarea <?php echo $tip; ?> <?php echo $disabled; ?> data-field="<?php echo $name; ?>" class="fcf_label" id="label_<?php echo $name ?>" class="field-name"
252
  name="inspire_checkout_fields[settings][<?php echo $key ?>][<?php echo $name ?>][label]"><?php if ( isset( $settings[ $key ][ $name ]['label'] ) ): echo stripslashes( $settings[ $key ][ $name ]['label'] );
253
  elseif ( isset( $field['label'] ) ): echo $field['label']; endif; ?></textarea>
254
 
248
  }
249
  ?>
250
 
251
+ <textarea <?php echo $tip; ?> <?php echo $disabled; ?> data-field="<?php echo $name; ?>" class="fcf_label field-name" id="label_<?php echo $name ?>" class="field-name"
252
  name="inspire_checkout_fields[settings][<?php echo $key ?>][<?php echo $name ?>][label]"><?php if ( isset( $settings[ $key ][ $name ]['label'] ) ): echo stripslashes( $settings[ $key ][ $name ]['label'] );
253
  elseif ( isset( $field['label'] ) ): echo $field['label']; endif; ?></textarea>
254
 
flexible-checkout-fields.php CHANGED
@@ -3,15 +3,15 @@
3
  Plugin Name: Flexible Checkout Fields
4
  Plugin URI: https://www.wpdesk.net/products/flexible-checkout-fields-pro-woocommerce/
5
  Description: Manage your WooCommerce checkout fields. Change order, labels, placeholders and add new fields.
6
- Version: 1.5.6
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-checkout-fields
10
  Domain Path: /lang/
11
  Requires at least: 4.5
12
- Tested up to: 4.9
13
  WC requires at least: 2.6.14
14
- WC tested up to: 3.2.4
15
 
16
  Copyright 2017 WP Desk Ltd.
17
 
@@ -129,7 +129,8 @@
129
  add_action( 'flexible_checkout_fields_field_tabs_content', array( 'inspireCheckoutFields', 'flexible_checkout_fields_field_tabs_content'), 10, 4 );
130
 
131
  add_action( 'woocommerce_default_address_fields', array( $this, 'woocommerce_default_address_fields' ), 9999 );
132
- add_filter( 'woocommerce_get_country_locale', array( $this, 'woocommerce_get_country_locale' ) );
 
133
  add_filter( 'woocommerce_localisation_address_formats', array( $this, 'woocommerce_localisation_address_formats' ) );
134
 
135
  add_action( 'woocommerce_get_country_locale_default', array( $this, 'woocommerce_get_country_locale_default' ), 11 );
@@ -137,6 +138,14 @@
137
  $this->get_sections();
138
  }
139
 
 
 
 
 
 
 
 
 
140
  public function woocommerce_localisation_address_formats( $formats ) {
141
  return $formats;
142
  }
@@ -146,6 +155,8 @@
146
  foreach ( $locale as $country => $fields ) {
147
  foreach ( $fields as $field => $settings ) {
148
  unset( $locale[ $country ][ $field ]['priority'] );
 
 
149
  }
150
  }
151
  }
3
  Plugin Name: Flexible Checkout Fields
4
  Plugin URI: https://www.wpdesk.net/products/flexible-checkout-fields-pro-woocommerce/
5
  Description: Manage your WooCommerce checkout fields. Change order, labels, placeholders and add new fields.
6
+ Version: 1.5.7
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-checkout-fields
10
  Domain Path: /lang/
11
  Requires at least: 4.5
12
+ Tested up to: 4.9.1
13
  WC requires at least: 2.6.14
14
+ WC tested up to: 3.2.6
15
 
16
  Copyright 2017 WP Desk Ltd.
17
 
129
  add_action( 'flexible_checkout_fields_field_tabs_content', array( 'inspireCheckoutFields', 'flexible_checkout_fields_field_tabs_content'), 10, 4 );
130
 
131
  add_action( 'woocommerce_default_address_fields', array( $this, 'woocommerce_default_address_fields' ), 9999 );
132
+ add_filter( 'woocommerce_get_country_locale', array( $this, 'woocommerce_get_country_locale' ), 9999 );
133
+ add_filter( 'woocommerce_get_country_locale_base', array( $this, 'woocommerce_get_country_locale_base' ), 9999 );
134
  add_filter( 'woocommerce_localisation_address_formats', array( $this, 'woocommerce_localisation_address_formats' ) );
135
 
136
  add_action( 'woocommerce_get_country_locale_default', array( $this, 'woocommerce_get_country_locale_default' ), 11 );
138
  $this->get_sections();
139
  }
140
 
141
+ public function woocommerce_get_country_locale_base( $base ) {
142
+ foreach ( $base as $key => $field ) {
143
+ unset( $base[$key]['placeholder']);
144
+ unset( $base[$key]['label']);
145
+ }
146
+ return $base;
147
+ }
148
+
149
  public function woocommerce_localisation_address_formats( $formats ) {
150
  return $formats;
151
  }
155
  foreach ( $locale as $country => $fields ) {
156
  foreach ( $fields as $field => $settings ) {
157
  unset( $locale[ $country ][ $field ]['priority'] );
158
+ unset( $locale[ $country ][ $field ]['label'] );
159
+ unset( $locale[ $country ][ $field ]['placeholder'] );
160
  }
161
  }
162
  }
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: wpdesk
3
  Donate link: https://www.wpdesk.net/flexible-checkout-fields-woocommerce/
4
  Tags: woocommerce checkout fields, woocommerce custom fields, woocommerce checkout manager, woocommerce checkout editor, woocommerce fields manager, woocommerce fields editor, woocommerce custom checkout fields, woocommerce checkout options, woocommerce checkout pro, woocommerce custom sections, woocommerce file upload
5
  Requires at least: 4.5
6
- Tested up to: 4.9
7
- Stable tag: 1.5.6
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -165,6 +165,10 @@ If you are upgrading from the old WooCommerce Checkout Fields version (1.1, wooc
165
 
166
  == Changelog ==
167
 
 
 
 
 
168
  = 1.5.6 - 2017-11-22 =
169
  * Added unintrusive review request for WordPress.org - please support the free version and add a 5-star review!
170
  * Fixed a minor display glitch in the admin
3
  Donate link: https://www.wpdesk.net/flexible-checkout-fields-woocommerce/
4
  Tags: woocommerce checkout fields, woocommerce custom fields, woocommerce checkout manager, woocommerce checkout editor, woocommerce fields manager, woocommerce fields editor, woocommerce custom checkout fields, woocommerce checkout options, woocommerce checkout pro, woocommerce custom sections, woocommerce file upload
5
  Requires at least: 4.5
6
+ Tested up to: 4.9.1
7
+ Stable tag: 1.5.7
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
165
 
166
  == Changelog ==
167
 
168
+ = 1.5.7 - 2017-12-14 =
169
+ * Fixed issue with changing name and placeholder for core WooCommerce fields
170
+ * Fixed displaying field name when it's removed
171
+
172
  = 1.5.6 - 2017-11-22 =
173
  * Added unintrusive review request for WordPress.org - please support the free version and add a 5-star review!
174
  * Fixed a minor display glitch in the admin
views/before-checkout-form.php CHANGED
@@ -21,7 +21,7 @@
21
  </style>
22
 
23
  <script type="text/javascript">
24
- jQuery(window).load(function() {
25
  <?php if ( isset( $args['settings']['billing'] ) ) : ?>
26
  <?php foreach ( $args['settings']['billing'] as $field ) : ?>
27
  <?php if ( $field['required'] == '0' ) : ?>
21
  </style>
22
 
23
  <script type="text/javascript">
24
+ jQuery(window).on('load', function() {
25
  <?php if ( isset( $args['settings']['billing'] ) ) : ?>
26
  <?php foreach ( $args['settings']['billing'] as $field ) : ?>
27
  <?php if ( $field['required'] == '0' ) : ?>