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

Version Description

  • 2019-11-05 =
  • Fixed fakepath in file name
Download this release

Release Info

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

Code changes from version 2.2.0 to 2.2.1

assets/js/checkout.js CHANGED
@@ -8,20 +8,25 @@ jQuery(document).on("click",".inspire-file-delete-button",function() {
8
  jQuery(this).parent().find('.inspire-file-info').empty();
9
  jQuery(this).parent().find('.inspire-file-info').hide();
10
  jQuery(this).parent().find('.inspire-file-delete-button').hide();
11
- jQuery(this).parent().find('.inspire-file-add-button').show();
12
  });
13
 
14
  jQuery(document).on("change",".inspire-file-file",function() {
15
  var id = jQuery(this).parent().attr('id');
16
- jQuery(this).parent().find('.inspire-file-info').empty();
17
- jQuery(this).parent().find('.inspire-file-error').empty();
18
- jQuery(this).parent().find('.inspire-file-error').hide();
19
- jQuery('#' + id).find('.inspire-file-info').show();
20
- jQuery('#' + id).find('.inspire-file-info').append( words.uploading );
 
 
 
21
  jQuery(this).parent().find('input[type=text]').val(jQuery(this).val());
22
- jQuery(this).parent().find('.inspire-file-add-button').hide();
23
- var fd = new FormData();
24
- fd.append(jQuery(this).attr('field_name'), jQuery(this).prop('files')[0]);
 
 
25
  fd.append( 'action', 'cf_upload' );
26
  fd.append( 'inspire_upload_nonce', inspire_upload_nonce );
27
 
@@ -33,37 +38,34 @@ jQuery(document).on("change",".inspire-file-file",function() {
33
  data: fd,
34
  contentType: false,
35
  processData: false,
36
- success: function(response){
37
  jQuery('#place_order').prop('disabled',false);
38
  if ( response != 0 ) {
39
- response = JSON.parse(response);
40
  if ( response.status != 'ok' ) {
41
- jQuery('#' + id).find('.inspire-file-add-button').show();
42
- jQuery('#' + id).find('.inspire-file-info').empty();
43
- jQuery('#' + id).find('.inspire-file-info').hide();
44
- jQuery('#' + id).find('.inspire-file-error').empty();
45
- jQuery('#' + id).find('.inspire-file-error').show();
46
- jQuery('#' + id).find('.inspire-file-error').append( response.message + '<br/>' );
47
  jQuery('#' + id).find('.inspire-file-file').val('');
48
  jQuery('#' + id).find('.inspire-file').val('');
49
  }
50
  else {
51
- jQuery('#' + id).find('.inspire-file-delete-button').show();
52
- jQuery('#' + id).find('.inspire-file-error').empty();
53
- jQuery('#' + id).find('.inspire-file-error').hide();
54
- jQuery('#' + id).find('.inspire-file-info').empty();
55
- jQuery('#' + id).find('.inspire-file-info').show();
56
- var filename = jQuery('#' + id).find('input[type=file]').val().replace(/.*(\/|\\)/, '');
57
- jQuery('#' + id).find('.inspire-file-info').append(filename + '<br/>');
58
  }
59
  if ( jQuery('#' + id).find('.inspire-file').val() == '' ) {
60
- jQuery(this).parent().find('.inspire-file-info').empty();
61
- jQuery(this).parent().find('.inspire-file-error').empty();
62
- jQuery(this).parent().find('.inspire-file-error').hide();
63
  }
64
  }
65
- else {
66
- }
67
  }
68
  });
69
  });
8
  jQuery(this).parent().find('.inspire-file-info').empty();
9
  jQuery(this).parent().find('.inspire-file-info').hide();
10
  jQuery(this).parent().find('.inspire-file-delete-button').hide();
11
+ jQuery(this).parent().find('.inspire-file-add-button').show();
12
  });
13
 
14
  jQuery(document).on("change",".inspire-file-file",function() {
15
  var id = jQuery(this).parent().attr('id');
16
+ var $file_info = jQuery('#' + id).find('.inspire-file-info');
17
+ var $file_error = jQuery('#' + id).find('.inspire-file-error');
18
+ var $file_add_button = jQuery('#' + id).find('.inspire-file-add-button');
19
+ $file_info.empty();
20
+ $file_error.empty();
21
+ $file_error.hide();
22
+ $file_info.show();
23
+ $file_info.append( words.uploading );
24
  jQuery(this).parent().find('input[type=text]').val(jQuery(this).val());
25
+ $file_add_button.hide();
26
+ var fd = new FormData();
27
+ var file = jQuery(this).prop('files')[0];
28
+ var filename = file.name;
29
+ fd.append(jQuery(this).attr('field_name'), file);
30
  fd.append( 'action', 'cf_upload' );
31
  fd.append( 'inspire_upload_nonce', inspire_upload_nonce );
32
 
38
  data: fd,
39
  contentType: false,
40
  processData: false,
41
+ success: function(response){
42
  jQuery('#place_order').prop('disabled',false);
43
  if ( response != 0 ) {
44
+ response = JSON.parse(response);
45
  if ( response.status != 'ok' ) {
46
+ $file_add_button.show();
47
+ $file_info.empty();
48
+ $file_info.hide();
49
+ $file_error.empty();
50
+ $file_error.show();
51
+ $file_error.append( response.message + '<br/>' );
52
  jQuery('#' + id).find('.inspire-file-file').val('');
53
  jQuery('#' + id).find('.inspire-file').val('');
54
  }
55
  else {
56
+ jQuery('#' + id).find('.inspire-file-delete-button').show();
57
+ $file_error.empty();
58
+ $file_error.hide();
59
+ $file_info.empty();
60
+ $file_info.show();
61
+ $file_info.append(filename + '<br/>');
 
62
  }
63
  if ( jQuery('#' + id).find('.inspire-file').val() == '' ) {
64
+ $file_info.empty();
65
+ $file_error.empty();
66
+ $file_error.hide();
67
  }
68
  }
 
 
69
  }
70
  });
71
  });
assets/js/checkout.min.js CHANGED
@@ -1 +1 @@
1
- jQuery(document).on("click",".inspire-file-add-button",function(){jQuery(this).parent().find("input[type=file]").click()});jQuery(document).on("click",".inspire-file-delete-button",function(){jQuery(this).parent().find("input[type=file]").val("");jQuery(this).parent().find("input[type=text]").val("");jQuery(this).parent().find(".inspire-file-info").empty();jQuery(this).parent().find(".inspire-file-info").hide();jQuery(this).parent().find(".inspire-file-delete-button").hide();jQuery(this).parent().find(".inspire-file-add-button").show()});jQuery(document).on("change",".inspire-file-file",function(){var b=jQuery(this).parent().attr("id");jQuery(this).parent().find(".inspire-file-info").empty();jQuery(this).parent().find(".inspire-file-error").empty();jQuery(this).parent().find(".inspire-file-error").hide();jQuery("#"+b).find(".inspire-file-info").show();jQuery("#"+b).find(".inspire-file-info").append(words.uploading);jQuery(this).parent().find("input[type=text]").val(jQuery(this).val());jQuery(this).parent().find(".inspire-file-add-button").hide();var a=new FormData();a.append(jQuery(this).attr("field_name"),jQuery(this).prop("files")[0]);a.append("action","cf_upload");a.append("inspire_upload_nonce",inspire_upload_nonce);jQuery("#place_order").prop("disabled",true);jQuery.ajax({type:"POST",url:ajaxurl,data:a,contentType:false,processData:false,success:function(d){jQuery("#place_order").prop("disabled",false);if(d!=0){d=JSON.parse(d);if(d.status!="ok"){jQuery("#"+b).find(".inspire-file-add-button").show();jQuery("#"+b).find(".inspire-file-info").empty();jQuery("#"+b).find(".inspire-file-info").hide();jQuery("#"+b).find(".inspire-file-error").empty();jQuery("#"+b).find(".inspire-file-error").show();jQuery("#"+b).find(".inspire-file-error").append(d.message+"<br/>");jQuery("#"+b).find(".inspire-file-file").val("");jQuery("#"+b).find(".inspire-file").val("")}else{jQuery("#"+b).find(".inspire-file-delete-button").show();jQuery("#"+b).find(".inspire-file-error").empty();jQuery("#"+b).find(".inspire-file-error").hide();jQuery("#"+b).find(".inspire-file-info").empty();jQuery("#"+b).find(".inspire-file-info").show();var c=jQuery("#"+b).find("input[type=file]").val().replace(/.*(\/|\\)/,"");jQuery("#"+b).find(".inspire-file-info").append(c+"<br/>")}if(jQuery("#"+b).find(".inspire-file").val()==""){jQuery(this).parent().find(".inspire-file-info").empty();jQuery(this).parent().find(".inspire-file-error").empty();jQuery(this).parent().find(".inspire-file-error").hide()}}else{}}})});
1
+ jQuery(document).on("click",".inspire-file-add-button",function(){jQuery(this).parent().find("input[type=file]").click()});jQuery(document).on("click",".inspire-file-delete-button",function(){jQuery(this).parent().find("input[type=file]").val("");jQuery(this).parent().find("input[type=text]").val("");jQuery(this).parent().find(".inspire-file-info").empty();jQuery(this).parent().find(".inspire-file-info").hide();jQuery(this).parent().find(".inspire-file-delete-button").hide();jQuery(this).parent().find(".inspire-file-add-button").show()});jQuery(document).on("change",".inspire-file-file",function(){var g=jQuery(this).parent().attr("id");var a=jQuery("#"+g).find(".inspire-file-info");var f=jQuery("#"+g).find(".inspire-file-error");var c=jQuery("#"+g).find(".inspire-file-add-button");a.empty();f.empty();f.hide();a.show();a.append(words.uploading);jQuery(this).parent().find("input[type=text]").val(jQuery(this).val());c.hide();var e=new FormData();var d=jQuery(this).prop("files")[0];var b=d.name;e.append(jQuery(this).attr("field_name"),d);e.append("action","cf_upload");e.append("inspire_upload_nonce",inspire_upload_nonce);jQuery("#place_order").prop("disabled",true);jQuery.ajax({type:"POST",url:ajaxurl,data:e,contentType:false,processData:false,success:function(h){jQuery("#place_order").prop("disabled",false);if(h!=0){h=JSON.parse(h);if(h.status!="ok"){c.show();a.empty();a.hide();f.empty();f.show();f.append(h.message+"<br/>");jQuery("#"+g).find(".inspire-file-file").val("");jQuery("#"+g).find(".inspire-file").val("")}else{jQuery("#"+g).find(".inspire-file-delete-button").show();f.empty();f.hide();a.empty();a.show();a.append(b+"<br/>")}if(jQuery("#"+g).find(".inspire-file").val()==""){a.empty();f.empty();f.hide()}}}})});
classes/class-flexible-checkout-fields-plugin.php CHANGED
@@ -22,7 +22,7 @@ class Flexible_Checkout_Fields_Plugin extends \FcfVendor\WPDesk\PluginBuilder\Pl
22
  *
23
  * @var string
24
  */
25
- private $scripts_version = FLEXIBLE_CHECKOUT_FIELDS_VERSION . '-4';
26
 
27
  protected $fields = array();
28
 
22
  *
23
  * @var string
24
  */
25
+ private $scripts_version = FLEXIBLE_CHECKOUT_FIELDS_VERSION . '.10';
26
 
27
  protected $fields = array();
28
 
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.2.0
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-checkout-fields
@@ -37,8 +37,8 @@ if ( ! defined( 'ABSPATH' ) ) {
37
 
38
 
39
  /* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
40
- $plugin_version = '2.2.0';
41
- $plugin_release_timestamp = '2019-09-23 13:40';
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.2.1
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-checkout-fields
37
 
38
 
39
  /* THESE TWO VARIABLES CAN BE CHANGED AUTOMATICALLY */
40
+ $plugin_version = '2.2.1';
41
+ $plugin_release_timestamp = '2019-11-04 11:40';
42
 
43
  define( 'FLEXIBLE_CHECKOUT_FIELDS_VERSION', $plugin_version );
44
 
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.2.3
8
- Stable tag: 2.2.0
9
  Requires PHP: 5.6
10
  License: GPLv3 or later
11
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -189,6 +189,9 @@ If you are upgrading from the old WooCommerce Checkout Fields version (1.1, wooc
189
 
190
  == Changelog ==
191
 
 
 
 
192
  = 2.2.0 - 2019-09-23 =
193
  * Prefixed libraries
194
 
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.2.3
8
+ Stable tag: 2.2.1
9
  Requires PHP: 5.6
10
  License: GPLv3 or later
11
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
189
 
190
  == Changelog ==
191
 
192
+ = 2.2.1 - 2019-11-05 =
193
+ * Fixed fakepath in file name
194
+
195
  = 2.2.0 - 2019-09-23 =
196
  * Prefixed libraries
197
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit9a02aebf5985f67c15bb98bf3cf9a0f0::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitbe608dfac6e0608c27d89d63ef5fc681::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit9a02aebf5985f67c15bb98bf3cf9a0f0
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit9a02aebf5985f67c15bb98bf3cf9a0f0
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit9a02aebf5985f67c15bb98bf3cf9a0f0', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit9a02aebf5985f67c15bb98bf3cf9a0f0', '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\ComposerStaticInit9a02aebf5985f67c15bb98bf3cf9a0f0::getInitializer($loader));
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 ComposerAutoloaderInitbe608dfac6e0608c27d89d63ef5fc681
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitbe608dfac6e0608c27d89d63ef5fc681', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitbe608dfac6e0608c27d89d63ef5fc681', '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\ComposerStaticInitbe608dfac6e0608c27d89d63ef5fc681::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 ComposerStaticInit9a02aebf5985f67c15bb98bf3cf9a0f0
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'P' =>
@@ -257,9 +257,9 @@ class ComposerStaticInit9a02aebf5985f67c15bb98bf3cf9a0f0
257
  public static function getInitializer(ClassLoader $loader)
258
  {
259
  return \Closure::bind(function () use ($loader) {
260
- $loader->prefixLengthsPsr4 = ComposerStaticInit9a02aebf5985f67c15bb98bf3cf9a0f0::$prefixLengthsPsr4;
261
- $loader->prefixDirsPsr4 = ComposerStaticInit9a02aebf5985f67c15bb98bf3cf9a0f0::$prefixDirsPsr4;
262
- $loader->classMap = ComposerStaticInit9a02aebf5985f67c15bb98bf3cf9a0f0::$classMap;
263
 
264
  }, null, ClassLoader::class);
265
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitbe608dfac6e0608c27d89d63ef5fc681
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'P' =>
257
  public static function getInitializer(ClassLoader $loader)
258
  {
259
  return \Closure::bind(function () use ($loader) {
260
+ $loader->prefixLengthsPsr4 = ComposerStaticInitbe608dfac6e0608c27d89d63ef5fc681::$prefixLengthsPsr4;
261
+ $loader->prefixDirsPsr4 = ComposerStaticInitbe608dfac6e0608c27d89d63ef5fc681::$prefixDirsPsr4;
262
+ $loader->classMap = ComposerStaticInitbe608dfac6e0608c27d89d63ef5fc681::$classMap;
263
 
264
  }, null, ClassLoader::class);
265
  }