Version Description
- 2020-09-17 =
- Fixed placeholder option for Radio and Multi-select field
Download this release
Release Info
Developer | wpdesk |
Plugin | Flexible Checkout Fields for WooCommerce – WooCommerce Checkout Manager |
Version | 2.5.5 |
Comparing to | |
See all releases |
Code changes from version 2.5.4 to 2.5.5
- classes/field-options.php +11 -2
- classes/plugin.php +2 -2
- flexible-checkout-fields.php +2 -2
- lang/flexible-checkout-fields.pot +3 -3
- readme.txt +4 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +4 -4
classes/field-options.php
CHANGED
@@ -16,6 +16,13 @@ class Flexible_Checkout_Fields_Field_Options {
|
|
16 |
*/
|
17 |
private $options_string;
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
/**
|
20 |
* Placeholder of field.
|
21 |
*
|
@@ -28,10 +35,12 @@ class Flexible_Checkout_Fields_Field_Options {
|
|
28 |
*
|
29 |
* @param string $options_string Options in string.
|
30 |
* @param string $empty_option_label Placeholder of field.
|
|
|
31 |
*/
|
32 |
-
public function __construct( $options_string, $empty_option_label = '' ) {
|
33 |
$this->options_string = $options_string;
|
34 |
$this->empty_option_label = $empty_option_label;
|
|
|
35 |
}
|
36 |
|
37 |
/**
|
@@ -43,7 +52,7 @@ class Flexible_Checkout_Fields_Field_Options {
|
|
43 |
*/
|
44 |
public function get_options_as_array( $placeholder_status = true ) {
|
45 |
$options = array();
|
46 |
-
if ( $placeholder_status ) {
|
47 |
$options[''] = ( ! empty( $this->empty_option_label ) )
|
48 |
? $this->empty_option_label
|
49 |
: __( 'Select option', 'flexible-checkout-fields' )
|
16 |
*/
|
17 |
private $options_string;
|
18 |
|
19 |
+
/**
|
20 |
+
* Type of field.
|
21 |
+
*
|
22 |
+
* @var string
|
23 |
+
*/
|
24 |
+
private $field_type;
|
25 |
+
|
26 |
/**
|
27 |
* Placeholder of field.
|
28 |
*
|
35 |
*
|
36 |
* @param string $options_string Options in string.
|
37 |
* @param string $empty_option_label Placeholder of field.
|
38 |
+
* @param string $field_type Type of field.
|
39 |
*/
|
40 |
+
public function __construct( $options_string, $empty_option_label = '', $field_type = '' ) {
|
41 |
$this->options_string = $options_string;
|
42 |
$this->empty_option_label = $empty_option_label;
|
43 |
+
$this->field_type = $field_type;
|
44 |
}
|
45 |
|
46 |
/**
|
52 |
*/
|
53 |
public function get_options_as_array( $placeholder_status = true ) {
|
54 |
$options = array();
|
55 |
+
if ( $placeholder_status && ( 'select' === $this->field_type ) ) {
|
56 |
$options[''] = ( ! empty( $this->empty_option_label ) )
|
57 |
? $this->empty_option_label
|
58 |
: __( 'Select option', 'flexible-checkout-fields' )
|
classes/plugin.php
CHANGED
@@ -584,7 +584,7 @@ class Flexible_Checkout_Fields_Plugin extends \FcfVendor\WPDesk\PluginBuilder\Pl
|
|
584 |
$new[ $key ][ $field['name'] ]['type'] = $field['type'];
|
585 |
|
586 |
if ( isset( $checkout_field_type[ $field['type'] ]['has_options'] ) ) {
|
587 |
-
$field_options = new Flexible_Checkout_Fields_Field_Options( $field['option'], $new[ $key ][ $field['name'] ]['placeholder'] );
|
588 |
$new[ $key ][ $field['name'] ]['options'] = $field_options->get_options_as_array();
|
589 |
}
|
590 |
}
|
@@ -726,7 +726,7 @@ class Flexible_Checkout_Fields_Plugin extends \FcfVendor\WPDesk\PluginBuilder\Pl
|
|
726 |
}
|
727 |
|
728 |
if ( isset( $field['type'] ) && ( ! empty( $checkout_field_type[ $field['type'] ]['has_options'] ) ) ) {
|
729 |
-
$field_options = new Flexible_Checkout_Fields_Field_Options( $field['option'], $new[ $key ]['placeholder'] );
|
730 |
$new[ $key ]['options'] = $field_options->get_options_as_array();
|
731 |
}
|
732 |
}
|
584 |
$new[ $key ][ $field['name'] ]['type'] = $field['type'];
|
585 |
|
586 |
if ( isset( $checkout_field_type[ $field['type'] ]['has_options'] ) ) {
|
587 |
+
$field_options = new Flexible_Checkout_Fields_Field_Options( $field['option'], $new[ $key ][ $field['name'] ]['placeholder'], $field['type'] );
|
588 |
$new[ $key ][ $field['name'] ]['options'] = $field_options->get_options_as_array();
|
589 |
}
|
590 |
}
|
726 |
}
|
727 |
|
728 |
if ( isset( $field['type'] ) && ( ! empty( $checkout_field_type[ $field['type'] ]['has_options'] ) ) ) {
|
729 |
+
$field_options = new Flexible_Checkout_Fields_Field_Options( $field['option'], $new[ $key ]['placeholder'], $field['type'] );
|
730 |
$new[ $key ]['options'] = $field_options->get_options_as_array();
|
731 |
}
|
732 |
}
|
flexible-checkout-fields.php
CHANGED
@@ -3,7 +3,7 @@
|
|
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.5.
|
7 |
Author: WP Desk
|
8 |
Author URI: https://www.wpdesk.net/
|
9 |
Text Domain: flexible-checkout-fields
|
@@ -39,7 +39,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
39 |
|
40 |
|
41 |
/* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
|
42 |
-
$plugin_version = '2.5.
|
43 |
|
44 |
define( 'FLEXIBLE_CHECKOUT_FIELDS_VERSION', $plugin_version );
|
45 |
|
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.5.5
|
7 |
Author: WP Desk
|
8 |
Author URI: https://www.wpdesk.net/
|
9 |
Text Domain: flexible-checkout-fields
|
39 |
|
40 |
|
41 |
/* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
|
42 |
+
$plugin_version = '2.5.5';
|
43 |
|
44 |
define( 'FLEXIBLE_CHECKOUT_FIELDS_VERSION', $plugin_version );
|
45 |
|
lang/flexible-checkout-fields.pot
CHANGED
@@ -7,8 +7,8 @@ msgstr ""
|
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
"Content-Transfer-Encoding: 8bit\n"
|
10 |
-
"POT-Creation-Date: 2020-09-
|
11 |
-
"PO-Revision-Date: 2020-09-
|
12 |
"Language: \n"
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
@@ -97,7 +97,7 @@ msgstr ""
|
|
97 |
msgid "Additional Information"
|
98 |
msgstr ""
|
99 |
|
100 |
-
#: /builds/wpdesk/flexible-checkout-fields/classes/field-options.php:
|
101 |
msgid "Select option"
|
102 |
msgstr ""
|
103 |
|
7 |
"MIME-Version: 1.0\n"
|
8 |
"Content-Type: text/plain; charset=UTF-8\n"
|
9 |
"Content-Transfer-Encoding: 8bit\n"
|
10 |
+
"POT-Creation-Date: 2020-09-17T21:59:32+00:00\n"
|
11 |
+
"PO-Revision-Date: 2020-09-17T21:59:32+00:00\n"
|
12 |
"Language: \n"
|
13 |
"X-Poedit-Basepath: ..\n"
|
14 |
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
97 |
msgid "Additional Information"
|
98 |
msgstr ""
|
99 |
|
100 |
+
#: /builds/wpdesk/flexible-checkout-fields/classes/field-options.php:58
|
101 |
msgid "Select option"
|
102 |
msgstr ""
|
103 |
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ 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.5
|
8 |
-
Stable tag: 2.5.
|
9 |
Requires PHP: 5.6
|
10 |
License: GPLv3 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -187,6 +187,9 @@ If you are upgrading from the old WooCommerce Checkout Fields version (1.1, wooc
|
|
187 |
|
188 |
== Changelog ==
|
189 |
|
|
|
|
|
|
|
190 |
= 2.5.4 - 2020-09-16 =
|
191 |
* Added placeholder option for Select field (with empty value)
|
192 |
|
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.5
|
8 |
+
Stable tag: 2.5.5
|
9 |
Requires PHP: 5.6
|
10 |
License: GPLv3 or later
|
11 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
187 |
|
188 |
== Changelog ==
|
189 |
|
190 |
+
= 2.5.5 - 2020-09-17 =
|
191 |
+
* Fixed placeholder option for Radio and Multi-select field
|
192 |
+
|
193 |
= 2.5.4 - 2020-09-16 =
|
194 |
* Added placeholder option for Select field (with empty value)
|
195 |
|
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 ComposerAutoloaderInitee75fd2766942f81a5024404c85e1537::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 ComposerAutoloaderInit32a929d23cd40a6d03c79fb1a88e9aaf
|
|
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 ComposerAutoloaderInitee75fd2766942f81a5024404c85e1537
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInitee75fd2766942f81a5024404c85e1537', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInitee75fd2766942f81a5024404c85e1537', '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\ComposerStaticInitee75fd2766942f81a5024404c85e1537::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' =>
|
@@ -280,9 +280,9 @@ class ComposerStaticInit32a929d23cd40a6d03c79fb1a88e9aaf
|
|
280 |
public static function getInitializer(ClassLoader $loader)
|
281 |
{
|
282 |
return \Closure::bind(function () use ($loader) {
|
283 |
-
$loader->prefixLengthsPsr4 =
|
284 |
-
$loader->prefixDirsPsr4 =
|
285 |
-
$loader->classMap =
|
286 |
|
287 |
}, null, ClassLoader::class);
|
288 |
}
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInitee75fd2766942f81a5024404c85e1537
|
8 |
{
|
9 |
public static $prefixLengthsPsr4 = array (
|
10 |
'P' =>
|
280 |
public static function getInitializer(ClassLoader $loader)
|
281 |
{
|
282 |
return \Closure::bind(function () use ($loader) {
|
283 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInitee75fd2766942f81a5024404c85e1537::$prefixLengthsPsr4;
|
284 |
+
$loader->prefixDirsPsr4 = ComposerStaticInitee75fd2766942f81a5024404c85e1537::$prefixDirsPsr4;
|
285 |
+
$loader->classMap = ComposerStaticInitee75fd2766942f81a5024404c85e1537::$classMap;
|
286 |
|
287 |
}, null, ClassLoader::class);
|
288 |
}
|