Version Description
- 2018-05-25 =
- Fixed missing address in emails
Download this release
Release Info
Developer | jablonowski |
Plugin | Flexible Checkout Fields for WooCommerce – WooCommerce Checkout Manager |
Version | 1.6.5 |
Comparing to | |
See all releases |
Code changes from version 1.6.4 to 1.6.5
- classes/display-options.php +43 -20
- flexible-checkout-fields.php +3 -3
- readme.txt +4 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +4 -4
- vendor/composer/autoload_static.php +1 -1
classes/display-options.php
CHANGED
@@ -30,7 +30,7 @@ class Flexible_Checkout_Fields_Disaplay_Options {
|
|
30 |
*
|
31 |
*/
|
32 |
protected function hooks() {
|
33 |
-
add_filter( 'woocommerce_localisation_address_formats', array( $this, '
|
34 |
add_filter( 'woocommerce_formatted_address_replacements', array( $this, 'woocommerce_formatted_address_replacements' ), self::HOOK_PRIORITY_LAST, 2 );
|
35 |
add_filter( 'woocommerce_order_formatted_billing_address', array( $this, 'woocommerce_order_formatted_billing_address' ), self::HOOK_PRIORITY_LAST, 2 );
|
36 |
add_filter( 'woocommerce_order_formatted_shipping_address', array( $this, 'woocommerce_order_formatted_shipping_address' ), self::HOOK_PRIORITY_LAST, 2 );
|
@@ -162,9 +162,48 @@ class Flexible_Checkout_Fields_Disaplay_Options {
|
|
162 |
return $this->plugin->getCheckoutFields( $fields, $request_type );
|
163 |
}
|
164 |
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
$fields = $this->getCheckoutFields( array(), $this->current_address_type );
|
|
|
|
|
|
|
168 |
$default_format = $formats['default'];
|
169 |
if ( $this->is_edit_address_page()
|
170 |
|| $this->is_order_page()
|
@@ -173,23 +212,7 @@ class Flexible_Checkout_Fields_Disaplay_Options {
|
|
173 |
) {
|
174 |
$default_format = '';
|
175 |
foreach ( $fields as $field_key => $field ) {
|
176 |
-
|
177 |
-
&& in_array( $field_key, array( 'billing_phone', 'billing_email' ) )
|
178 |
-
) {
|
179 |
-
continue;
|
180 |
-
}
|
181 |
-
if ( isset( $field['type'] ) && $field['type'] == 'file' ) {
|
182 |
-
continue;
|
183 |
-
}
|
184 |
-
if ( isset( $field['type'] ) && in_array( $field['type'], array( 'heading', 'info' ) ) ) {
|
185 |
-
continue;
|
186 |
-
}
|
187 |
-
if ( $this->is_field_displayable( $field ) ) {
|
188 |
-
if ( $default_format != '' ) {
|
189 |
-
$default_format .= "\n";
|
190 |
-
}
|
191 |
-
$default_format .= '{' . str_replace( $this->current_address_type . '_', '', $field['name'] . '}' );
|
192 |
-
}
|
193 |
}
|
194 |
}
|
195 |
$new_formats = array( 'default' => $default_format );
|
30 |
*
|
31 |
*/
|
32 |
protected function hooks() {
|
33 |
+
add_filter( 'woocommerce_localisation_address_formats', array( $this, 'woocommerce_localisation_address_formats_filter' ), self::HOOK_PRIORITY_LAST );
|
34 |
add_filter( 'woocommerce_formatted_address_replacements', array( $this, 'woocommerce_formatted_address_replacements' ), self::HOOK_PRIORITY_LAST, 2 );
|
35 |
add_filter( 'woocommerce_order_formatted_billing_address', array( $this, 'woocommerce_order_formatted_billing_address' ), self::HOOK_PRIORITY_LAST, 2 );
|
36 |
add_filter( 'woocommerce_order_formatted_shipping_address', array( $this, 'woocommerce_order_formatted_shipping_address' ), self::HOOK_PRIORITY_LAST, 2 );
|
162 |
return $this->plugin->getCheckoutFields( $fields, $request_type );
|
163 |
}
|
164 |
|
165 |
+
/**
|
166 |
+
* Append field to address format.
|
167 |
+
*
|
168 |
+
* @param string $format
|
169 |
+
* @param string $field_key
|
170 |
+
* @param array $field
|
171 |
+
*
|
172 |
+
* @return string
|
173 |
+
*/
|
174 |
+
private function append_field_to_address_format( $format, $field_key, $field ) {
|
175 |
+
if ( ( $this->is_thankyou_page() || $this->is_in_email() || $this->is_order_page() )
|
176 |
+
&& in_array( $field_key, array( 'billing_phone', 'billing_email' ) )
|
177 |
+
) {
|
178 |
+
return $format;
|
179 |
+
}
|
180 |
+
if ( isset( $field['type'] ) && $field['type'] == 'file' ) {
|
181 |
+
return $format;
|
182 |
+
}
|
183 |
+
if ( isset( $field['type'] ) && in_array( $field['type'], array( 'heading', 'info' ) ) ) {
|
184 |
+
return $format;
|
185 |
+
}
|
186 |
+
if ( $this->is_field_displayable( $field ) ) {
|
187 |
+
if ( $format != '' ) {
|
188 |
+
$format .= "\n";
|
189 |
+
}
|
190 |
+
$format .= '{' . str_replace( $this->current_address_type . '_', '', $field['name'] . '}' );
|
191 |
+
}
|
192 |
+
return $format;
|
193 |
+
}
|
194 |
+
|
195 |
+
/**
|
196 |
+
* Localisation address formats - woocommerce filter.
|
197 |
+
*
|
198 |
+
* @param array $formats
|
199 |
+
*
|
200 |
+
* @return array
|
201 |
+
*/
|
202 |
+
public function woocommerce_localisation_address_formats_filter( $formats ) {
|
203 |
$fields = $this->getCheckoutFields( array(), $this->current_address_type );
|
204 |
+
if ( empty( $fields ) ) {
|
205 |
+
return $formats;
|
206 |
+
}
|
207 |
$default_format = $formats['default'];
|
208 |
if ( $this->is_edit_address_page()
|
209 |
|| $this->is_order_page()
|
212 |
) {
|
213 |
$default_format = '';
|
214 |
foreach ( $fields as $field_key => $field ) {
|
215 |
+
$default_format = $this->append_field_to_address_format( $default_format, $field_key, $field );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
}
|
217 |
}
|
218 |
$new_formats = array( 'default' => $default_format );
|
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: 1.6.
|
7 |
Author: WP Desk
|
8 |
Author URI: https://www.wpdesk.net/
|
9 |
Text Domain: flexible-checkout-fields
|
@@ -33,7 +33,7 @@
|
|
33 |
|
34 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
35 |
|
36 |
-
$plugin_version = '1.6.
|
37 |
define( 'FLEXIBLE_CHECKOUT_FIELDS_VERSION', $plugin_version );
|
38 |
|
39 |
|
@@ -66,7 +66,7 @@
|
|
66 |
|
67 |
class Flexible_Checkout_Fields_Plugin extends WPDesk_Plugin_1_8 {
|
68 |
|
69 |
-
protected $script_version = '1.6.
|
70 |
|
71 |
protected $fields = array();
|
72 |
|
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.6.5
|
7 |
Author: WP Desk
|
8 |
Author URI: https://www.wpdesk.net/
|
9 |
Text Domain: flexible-checkout-fields
|
33 |
|
34 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
35 |
|
36 |
+
$plugin_version = '1.6.5';
|
37 |
define( 'FLEXIBLE_CHECKOUT_FIELDS_VERSION', $plugin_version );
|
38 |
|
39 |
|
66 |
|
67 |
class Flexible_Checkout_Fields_Plugin extends WPDesk_Plugin_1_8 {
|
68 |
|
69 |
+
protected $script_version = '1.6.5';
|
70 |
|
71 |
protected $fields = array();
|
72 |
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ 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.6
|
7 |
-
Stable tag: 1.6.
|
8 |
Requires PHP: 5.5
|
9 |
License: GPLv3 or later
|
10 |
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 |
= 1.6.4 - 2018-05-23 =
|
191 |
* Added support for WooCommerce 3.4
|
192 |
|
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.6
|
7 |
+
Stable tag: 1.6.5
|
8 |
Requires PHP: 5.5
|
9 |
License: GPLv3 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
187 |
|
188 |
== Changelog ==
|
189 |
|
190 |
+
= 1.6.5 - 2018-05-25 =
|
191 |
+
* Fixed missing address in emails
|
192 |
+
|
193 |
= 1.6.4 - 2018-05-23 =
|
194 |
* Added support for WooCommerce 3.4
|
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 ComposerAutoloaderInit6cb8f29f730238dc8aa2418f30cc4723::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 ComposerAutoloaderInit633bc0a9f26ecf75e0c71f3d6f2cb6fb
|
|
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 ComposerAutoloaderInit6cb8f29f730238dc8aa2418f30cc4723
|
6 |
{
|
7 |
private static $loader;
|
8 |
|
19 |
return self::$loader;
|
20 |
}
|
21 |
|
22 |
+
spl_autoload_register(array('ComposerAutoloaderInit6cb8f29f730238dc8aa2418f30cc4723', 'loadClassLoader'), true, true);
|
23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit6cb8f29f730238dc8aa2418f30cc4723', '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\ComposerStaticInit6cb8f29f730238dc8aa2418f30cc4723::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 function getInitializer(ClassLoader $loader)
|
10 |
{
|
4 |
|
5 |
namespace Composer\Autoload;
|
6 |
|
7 |
+
class ComposerStaticInit6cb8f29f730238dc8aa2418f30cc4723
|
8 |
{
|
9 |
public static function getInitializer(ClassLoader $loader)
|
10 |
{
|