Version Description
- 2020-02-20 =
- Added support for the latest Flexible Checkout Fields PRO release
- Fixed customer address' details on thank you page
Download this release
Release Info
Developer | wpdesk |
Plugin | Flexible Checkout Fields for WooCommerce – WooCommerce Checkout Manager |
Version | 2.3.1 |
Comparing to | |
See all releases |
Code changes from version 2.2.4 to 2.3.1
- classes/display-options.php +36 -1
- flexible-checkout-fields.php +5 -5
- readme.txt +13 -6
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
classes/display-options.php
CHANGED
@@ -169,8 +169,14 @@ class Flexible_Checkout_Fields_Disaplay_Options {
|
|
169 |
if ( $format != '' ) {
|
170 |
$format .= "\n";
|
171 |
}
|
172 |
-
|
|
|
|
|
|
|
|
|
|
|
173 |
}
|
|
|
174 |
return $format;
|
175 |
}
|
176 |
|
@@ -194,6 +200,7 @@ class Flexible_Checkout_Fields_Disaplay_Options {
|
|
194 |
) {
|
195 |
$default_format = '';
|
196 |
foreach ( $fields as $field_key => $field ) {
|
|
|
197 |
$default_format = $this->append_field_to_address_format( $default_format, $field_key, $field );
|
198 |
}
|
199 |
}
|
@@ -272,10 +279,15 @@ class Flexible_Checkout_Fields_Disaplay_Options {
|
|
272 |
}
|
273 |
|
274 |
public function woocommerce_formatted_address_replacements( $fields, $args ) {
|
|
|
|
|
275 |
foreach ( $args as $arg_key => $arg ) {
|
276 |
if ( !isset( $fields['{' . $arg_key . '}'] ) ) {
|
277 |
$fields['{' . $arg_key . '}'] = $arg;
|
278 |
}
|
|
|
|
|
|
|
279 |
}
|
280 |
return $fields;
|
281 |
}
|
@@ -286,6 +298,28 @@ class Flexible_Checkout_Fields_Disaplay_Options {
|
|
286 |
return $this->woocommerce_order_formatted_address( $fields, $order, 'billing' );
|
287 |
}
|
288 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
/**
|
290 |
* Replaces field meta value using field options
|
291 |
*
|
@@ -321,6 +355,7 @@ class Flexible_Checkout_Fields_Disaplay_Options {
|
|
321 |
* @return mixed
|
322 |
*/
|
323 |
public function woocommerce_order_formatted_address( $fields, $order, $address_type ) {
|
|
|
324 |
$cf_fields = $this->getCheckoutFields( array(), $address_type );
|
325 |
$checkout_field_type = $this->plugin->get_fields();
|
326 |
|
169 |
if ( $format != '' ) {
|
170 |
$format .= "\n";
|
171 |
}
|
172 |
+
if ( $field['name'] === $this->current_address_type . '_last_name' || $field['name'] === $this->current_address_type . '_postcode' ) {
|
173 |
+
unset($field['name']);
|
174 |
+
}
|
175 |
+
if ( isset( $field['name'] ) ) {
|
176 |
+
$format .= '{' . $this->replace_only_first( $this->current_address_type . '_', '', $field['name'] . '}' );
|
177 |
+
}
|
178 |
}
|
179 |
+
|
180 |
return $format;
|
181 |
}
|
182 |
|
200 |
) {
|
201 |
$default_format = '';
|
202 |
foreach ( $fields as $field_key => $field ) {
|
203 |
+
|
204 |
$default_format = $this->append_field_to_address_format( $default_format, $field_key, $field );
|
205 |
}
|
206 |
}
|
279 |
}
|
280 |
|
281 |
public function woocommerce_formatted_address_replacements( $fields, $args ) {
|
282 |
+
|
283 |
+
$fields = $this->unset_not_correct_formatted_address_data( $fields );
|
284 |
foreach ( $args as $arg_key => $arg ) {
|
285 |
if ( !isset( $fields['{' . $arg_key . '}'] ) ) {
|
286 |
$fields['{' . $arg_key . '}'] = $arg;
|
287 |
}
|
288 |
+
if ( isset( $fields['{postcode}'] ) ) {
|
289 |
+
$fields['{postcode}'] = '';
|
290 |
+
}
|
291 |
}
|
292 |
return $fields;
|
293 |
}
|
298 |
return $this->woocommerce_order_formatted_address( $fields, $order, 'billing' );
|
299 |
}
|
300 |
|
301 |
+
/**
|
302 |
+
* Display customer details in correct way
|
303 |
+
*
|
304 |
+
* @param array $fields
|
305 |
+
*
|
306 |
+
* @return array [{first_name} => James Cameron, {address} => Awesome Street]
|
307 |
+
*/
|
308 |
+
private function unset_not_correct_formatted_address_data( $fields ) {
|
309 |
+
if ( ! empty( $fields ) ) {
|
310 |
+
if ( isset( $fields['{first_name}'] ) && isset( $fields['{last_name}'] ) ) {
|
311 |
+
$fields['{first_name}'] .= ' ' . $fields['{last_name}'];
|
312 |
+
unset($fields['{last_name}']);
|
313 |
+
}
|
314 |
+
if ( isset( $fields['{city}'] ) && isset( $fields['{postcode}'] ) ) {
|
315 |
+
$fields['{city}'] .= ' ' . $fields['{postcode}'];
|
316 |
+
unset($fields['{postcode}']);
|
317 |
+
}
|
318 |
+
}
|
319 |
+
|
320 |
+
return $fields;
|
321 |
+
}
|
322 |
+
|
323 |
/**
|
324 |
* Replaces field meta value using field options
|
325 |
*
|
355 |
* @return mixed
|
356 |
*/
|
357 |
public function woocommerce_order_formatted_address( $fields, $order, $address_type ) {
|
358 |
+
|
359 |
$cf_fields = $this->getCheckoutFields( array(), $address_type );
|
360 |
$checkout_field_type = $this->plugin->get_fields();
|
361 |
|
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: 2.
|
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.6
|
12 |
-
Tested up to: 5.3.
|
13 |
WC requires at least: 3.1.0
|
14 |
-
WC tested up to: 3.9
|
15 |
Requires PHP: 5.6
|
16 |
|
17 |
Copyright 2017 WP Desk Ltd.
|
@@ -37,8 +37,8 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
37 |
|
38 |
|
39 |
/* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
|
40 |
-
$plugin_version = '2.
|
41 |
-
$plugin_release_timestamp = '
|
42 |
|
43 |
define( 'FLEXIBLE_CHECKOUT_FIELDS_VERSION', $plugin_version );
|
44 |
|
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: 2.3.1
|
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.6
|
12 |
+
Tested up to: 5.3.2
|
13 |
WC requires at least: 3.1.0
|
14 |
+
WC tested up to: 3.9.2
|
15 |
Requires PHP: 5.6
|
16 |
|
17 |
Copyright 2017 WP Desk Ltd.
|
37 |
|
38 |
|
39 |
/* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
|
40 |
+
$plugin_version = '2.3.1';
|
41 |
+
$plugin_release_timestamp = '2020-02-17 23:19';
|
42 |
|
43 |
define( 'FLEXIBLE_CHECKOUT_FIELDS_VERSION', $plugin_version );
|
44 |
|
readme.txt
CHANGED
@@ -4,8 +4,8 @@ Contributors: wpdesk,dyszczo,grola,potreb
|
|
4 |
Donate link: https://www.wpdesk.net/flexible-checkout-fields-woocommerce/
|
5 |
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
|
6 |
Requires at least: 4.5
|
7 |
-
Tested up to: 5.3.
|
8 |
-
Stable tag: 2.
|
9 |
Requires PHP: 5.6
|
10 |
License: GPLv3 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -104,6 +104,10 @@ Billing, Shipping or Order sections are not enough? Now you can add fields to 12
|
|
104 |
|
105 |
Enable conditional logic (show or hide) for fields based on other fields values (checkbox, radio, select).
|
106 |
|
|
|
|
|
|
|
|
|
107 |
= Conditional Logic for Products and Categories (PRO) =
|
108 |
|
109 |
Enable conditional logic (show or hide) for fields based on products and/or categories in the cart, i.e.:
|
@@ -120,7 +124,7 @@ This plugin is compatible with variable products.
|
|
120 |
|
121 |
= WooCommerce Compatibility =
|
122 |
|
123 |
-
**WooCommerce 3.
|
124 |
|
125 |
Flexible Checkout Fields also plays well with older versions of WooCommerce. We tested the plugin with WooCommerce 3.1.0 and up.
|
126 |
|
@@ -189,8 +193,12 @@ If you are upgrading from the old WooCommerce Checkout Fields version (1.1, wooc
|
|
189 |
|
190 |
== Changelog ==
|
191 |
|
|
|
|
|
|
|
|
|
192 |
= 2.2.4 - 2020-01-27 =
|
193 |
-
* Fixed typo in settings field tooltip
|
194 |
|
195 |
= 2.2.3 - 2020-01-03 =
|
196 |
* Added support for WooCommerce 3.9
|
@@ -199,7 +207,7 @@ If you are upgrading from the old WooCommerce Checkout Fields version (1.1, wooc
|
|
199 |
* Fixed WPML compatibility
|
200 |
|
201 |
= 2.2.1 - 2019-11-05 =
|
202 |
-
* Fixed fakepath in file name
|
203 |
|
204 |
= 2.2.0 - 2019-09-23 =
|
205 |
* Prefixed libraries
|
@@ -480,4 +488,3 @@ If you are upgrading from the old WooCommerce Checkout Fields version (1.1, wooc
|
|
480 |
|
481 |
= 0.9 – 2014-11-04 =
|
482 |
* Release!
|
483 |
-
|
4 |
Donate link: https://www.wpdesk.net/flexible-checkout-fields-woocommerce/
|
5 |
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
|
6 |
Requires at least: 4.5
|
7 |
+
Tested up to: 5.3.2
|
8 |
+
Stable tag: 2.3.1
|
9 |
Requires PHP: 5.6
|
10 |
License: GPLv3 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
104 |
|
105 |
Enable conditional logic (show or hide) for fields based on other fields values (checkbox, radio, select).
|
106 |
|
107 |
+
= Conditional Logic for Shipping Methods (PRO) =
|
108 |
+
|
109 |
+
Enable conditional logic (show or hide) for fields based on selected shipping method.
|
110 |
+
|
111 |
= Conditional Logic for Products and Categories (PRO) =
|
112 |
|
113 |
Enable conditional logic (show or hide) for fields based on products and/or categories in the cart, i.e.:
|
124 |
|
125 |
= WooCommerce Compatibility =
|
126 |
|
127 |
+
**WooCommerce 3.9 ready!**
|
128 |
|
129 |
Flexible Checkout Fields also plays well with older versions of WooCommerce. We tested the plugin with WooCommerce 3.1.0 and up.
|
130 |
|
193 |
|
194 |
== Changelog ==
|
195 |
|
196 |
+
= 2.3.1 - 2020-02-20 =
|
197 |
+
* Added support for the latest Flexible Checkout Fields PRO release
|
198 |
+
* Fixed customer address' details on thank you page
|
199 |
+
|
200 |
= 2.2.4 - 2020-01-27 =
|
201 |
+
* Fixed typo in the settings' field tooltip
|
202 |
|
203 |
= 2.2.3 - 2020-01-03 =
|
204 |
* Added support for WooCommerce 3.9
|
207 |
* Fixed WPML compatibility
|
208 |
|
209 |
= 2.2.1 - 2019-11-05 =
|
210 |
+
* Fixed fakepath in the file's name
|
211 |
|
212 |
= 2.2.0 - 2019-09-23 =
|
213 |
* Prefixed libraries
|
488 |
|
489 |
= 0.9 – 2014-11-04 =
|
490 |
* Release!
|
|
vendor/autoload.php
CHANGED
@@ -4,4 +4,4 @@
|
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
-
return
|
4 |
|
5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
6 |
|
7 |
+
return ComposerAutoloaderInitea1d8d408eab11fc82c09bbd42071c8c::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
-
class
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit7fb4b93099d61709fa42d14dd2bd9e27
|
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
-
spl_autoload_register(array('
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
-
spl_autoload_unregister(array('
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
-
call_user_func(\Composer\Autoload\
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
2 |
|
3 |
// autoload_real.php @generated by Composer
|
4 |
|
5 |
+
class ComposerAutoloaderInitea1d8d408eab11fc82c09bbd42071c8c
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitea1d8d408eab11fc82c09bbd42071c8c', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitea1d8d408eab11fc82c09bbd42071c8c', 'loadClassLoader'));
|
25 |
|
26 |
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
|
27 |
if ($useStaticLoader) {
|
28 |
require_once __DIR__ . '/autoload_static.php';
|
29 |
|
30 |
+
call_user_func(\Composer\Autoload\ComposerStaticInitea1d8d408eab11fc82c09bbd42071c8c::getInitializer($loader));
|
31 |
} else {
|
32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
33 |
foreach ($map as $namespace => $path) {
|
vendor/composer/autoload_static.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
-
class
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'P' =>
|
@@ -267,9 +267,9 @@ class ComposerStaticInit7fb4b93099d61709fa42d14dd2bd9e27
|
|
267 |
public static function getInitializer(ClassLoader $loader)
|
268 |
{
|
269 |
return \Closure::bind(function () use ($loader) {
|
270 |
-
$loader->prefixLengthsPsr4 =
|
271 |
-
$loader->prefixDirsPsr4 =
|
272 |
-
$loader->classMap =
|
273 |
|
274 |
}, null, ClassLoader::class);
|
275 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitea1d8d408eab11fc82c09bbd42071c8c
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'P' =>
|
267 |
public static function getInitializer(ClassLoader $loader)
|
268 |
{
|
269 |
return \Closure::bind(function () use ($loader) {
|
270 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitea1d8d408eab11fc82c09bbd42071c8c::$prefixLengthsPsr4;
|
271 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitea1d8d408eab11fc82c09bbd42071c8c::$prefixDirsPsr4;
|
272 |
+
$loader->classMap = ComposerStaticInitea1d8d408eab11fc82c09bbd42071c8c::$classMap;
|
273 |
|
274 |
}, null, ClassLoader::class);
|
275 |
}
|