Version Description
- 2016-09-22 =
- Fixed a warning on line 530
Download this release
Release Info
Developer | wpdesk |
Plugin | Flexible Checkout Fields for WooCommerce – WooCommerce Checkout Manager |
Version | 1.2.3 |
Comparing to | |
See all releases |
Code changes from version 1.2.2 to 1.2.3
- flexible-checkout-fields.php +13 -10
- readme.txt +4 -1
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.2.
|
7 |
Author: WP Desk
|
8 |
Author URI: https://www.wpdesk.net/
|
9 |
Text Domain: flexible-checkout-fields
|
@@ -266,7 +266,6 @@
|
|
266 |
public function getCheckoutFields( $fields, $request_type = null ) {
|
267 |
$settings = $this->get_settings();
|
268 |
$checkout_field_type = $this->get_fields();
|
269 |
-
error_log('request_type='.$request_type);
|
270 |
if ( !empty( $settings ) ) {
|
271 |
$new = array();
|
272 |
foreach ( $settings as $key => $type ) {
|
@@ -275,13 +274,15 @@ error_log('request_type='.$request_type);
|
|
275 |
continue;
|
276 |
}
|
277 |
}
|
|
|
|
|
|
|
278 |
if ( $request_type == null || $request_type == $key ) {
|
279 |
if ( !isset( $new[$key] ) ) {
|
280 |
$new[$key] = array();
|
281 |
}
|
282 |
$fields_found = true;
|
283 |
foreach ( $type as $field_name => $field ) {
|
284 |
-
//error_log( print_r($field,true) );
|
285 |
if( $field['visible'] == 0 || ($_GET['page'] == 'inspire_checkout_fields_settings' && $field['visible'] == 1) || $field['name'] == 'billing_country' or $field['name'] == 'shipping_country' ){
|
286 |
if ( isset( $fields[$key][$field['name']] ) ) {
|
287 |
$new[$key][$field['name']] = $fields[$key][$field['name']];
|
@@ -335,12 +336,14 @@ error_log('request_type='.$request_type);
|
|
335 |
}
|
336 |
}
|
337 |
}
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
|
|
|
|
344 |
}
|
345 |
if ( $request_type == null ) {
|
346 |
if(!empty($fields['account'])){
|
@@ -524,7 +527,7 @@ error_log('request_type='.$request_type);
|
|
524 |
|
525 |
$checkout_field_type = $this->get_fields();
|
526 |
|
527 |
-
if(!empty($settings)){
|
528 |
$return = array();
|
529 |
foreach ($settings as $key => $type) {
|
530 |
foreach ($type as $field) {
|
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.2.3
|
7 |
Author: WP Desk
|
8 |
Author URI: https://www.wpdesk.net/
|
9 |
Text Domain: flexible-checkout-fields
|
266 |
public function getCheckoutFields( $fields, $request_type = null ) {
|
267 |
$settings = $this->get_settings();
|
268 |
$checkout_field_type = $this->get_fields();
|
|
|
269 |
if ( !empty( $settings ) ) {
|
270 |
$new = array();
|
271 |
foreach ( $settings as $key => $type ) {
|
274 |
continue;
|
275 |
}
|
276 |
}
|
277 |
+
if ( !is_array( $type ) ) {
|
278 |
+
continue;
|
279 |
+
}
|
280 |
if ( $request_type == null || $request_type == $key ) {
|
281 |
if ( !isset( $new[$key] ) ) {
|
282 |
$new[$key] = array();
|
283 |
}
|
284 |
$fields_found = true;
|
285 |
foreach ( $type as $field_name => $field ) {
|
|
|
286 |
if( $field['visible'] == 0 || ($_GET['page'] == 'inspire_checkout_fields_settings' && $field['visible'] == 1) || $field['name'] == 'billing_country' or $field['name'] == 'shipping_country' ){
|
287 |
if ( isset( $fields[$key][$field['name']] ) ) {
|
288 |
$new[$key][$field['name']] = $fields[$key][$field['name']];
|
336 |
}
|
337 |
}
|
338 |
}
|
339 |
+
if ( !empty( $fields ) && is_array( $fields ) ) {
|
340 |
+
foreach ( $fields as $key => $value ) {
|
341 |
+
if ( $request_type == null || $request_type == $key ) {
|
342 |
+
if ( empty( $settings[$key] ) ) {
|
343 |
+
$new[$key] = $value;
|
344 |
+
}
|
345 |
+
}
|
346 |
+
}
|
347 |
}
|
348 |
if ( $request_type == null ) {
|
349 |
if(!empty($fields['account'])){
|
527 |
|
528 |
$checkout_field_type = $this->get_fields();
|
529 |
|
530 |
+
if( !empty( $settings ) && is_array( $settings ) ) {
|
531 |
$return = array();
|
532 |
foreach ($settings as $key => $type) {
|
533 |
foreach ($type as $field) {
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.wpdesk.net/flexible-checkout-fields-woocommerce/
|
|
4 |
Tags: woocommerce checkout, woocommerce checkout fields, flexible checkout 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.0
|
6 |
Tested up to: 4.6.1
|
7 |
-
Stable tag: 1.2.
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -129,6 +129,9 @@ If you are upgrading from the old WooCommerce Checkout Fields version (1.1, wooc
|
|
129 |
|
130 |
== Changelog ==
|
131 |
|
|
|
|
|
|
|
132 |
= 1.2.2 - 2016-09-16 =
|
133 |
* Fixed removing the last field from the section
|
134 |
* Fixed checkboxes default settings
|
4 |
Tags: woocommerce checkout, woocommerce checkout fields, flexible checkout 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.0
|
6 |
Tested up to: 4.6.1
|
7 |
+
Stable tag: 1.2.3
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
129 |
|
130 |
== Changelog ==
|
131 |
|
132 |
+
= 1.2.3 - 2016-09-22 =
|
133 |
+
* Fixed a warning on line 530
|
134 |
+
|
135 |
= 1.2.2 - 2016-09-16 =
|
136 |
* Fixed removing the last field from the section
|
137 |
* Fixed checkboxes default settings
|