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

Version Description

  • 2021-02-11 =
  • Added support for WooCommerce 5.0
Download this release

Release Info

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

Code changes from version 2.9.1 to 2.9.2

README.md DELETED
@@ -1,8 +0,0 @@
1
- [![pipeline status](https://gitlab.com/wpdesk/flexible-checkout-fields/badges/master/pipeline.svg)](https://gitlab.com/wpdesk/flexible-checkout-fields)
2
-
3
- [![coverage report](https://gitlab.com/wpdesk/flexible-checkout-fields/badges/master/coverage.svg?job=integration+test+lastest+coverage)](https://gitlab.com/wpdesk/flexible-checkout-fields) Integration
4
-
5
- [![coverage report](https://gitlab.com/wpdesk/flexible-checkout-fields/badges/master/coverage.svg?job=unit+test+lastest+coverage)](https://gitlab.com/wpdesk/flexible-checkout-fields) Unit
6
-
7
- Flexible Checkout Fields
8
- ========================
 
 
 
 
 
 
 
 
assets/js/admin-notice.js CHANGED
@@ -1,36 +1,40 @@
1
- jQuery(document).ready(function() {
2
 
3
- var notice = jQuery( '[data-notice="fcf-admin-notice"]' );
4
- var is_permanently = false;
 
 
 
5
  if ( ! notice ) {
6
  return;
7
  }
8
 
9
- function close_notice() {
 
 
10
 
11
  jQuery.ajax(
12
- notice.attr( 'data-notice-url' ),
13
  {
14
  type: 'POST',
15
  data: {
16
- action: notice.attr( 'data-notice-action' ),
17
  is_permanently: ( is_permanently ) ? 1 : 0,
18
  },
19
  }
20
  );
21
  }
 
 
 
 
 
22
 
23
- var notice_button_close = notice.find( '.notice-dismiss' );
24
- var notice_button_hide = notice.find( '[data-notice-button]' );
25
- if ( ! notice_button_close || ! notice_button_hide ) {
26
- return;
27
  }
28
 
29
- notice_button_close.click( close_notice );
30
- notice_button_hide.click( function( e ) {
31
- e.preventDefault();
32
- is_permanently = true;
33
- notice_button_close.click();
34
- } );
35
 
36
- });
1
+ jQuery( document ).ready( function() {
2
 
3
+ var notice_selector = '[data-notice="fcf-admin-notice"]';
4
+ var button_close_selector = notice_selector + ' .notice-dismiss';
5
+ var button_hide_selector = notice_selector + ' [data-notice-button]';
6
+
7
+ var notice = document.querySelector( notice_selector );
8
  if ( ! notice ) {
9
  return;
10
  }
11
 
12
+ var close_notice = function( e, is_permanently ) {
13
+ e.preventDefault();
14
+ window.removeEventListener( 'click', close_event );
15
 
16
  jQuery.ajax(
17
+ notice.getAttribute( 'data-notice-url' ),
18
  {
19
  type: 'POST',
20
  data: {
21
+ action: notice.getAttribute( 'data-notice-action' ),
22
  is_permanently: ( is_permanently ) ? 1 : 0,
23
  },
24
  }
25
  );
26
  }
27
+ var close_event = function( e ) {
28
+ if ( e.target.matches( button_close_selector ) ) {
29
+ close_notice( e, false );
30
+ } else if ( e.target.matches( button_hide_selector ) ) {
31
+ close_notice( e, true );
32
 
33
+ var button = document.querySelector( button_close_selector );
34
+ button.click();
35
+ }
 
36
  }
37
 
38
+ window.addEventListener( 'click', close_event );
 
 
 
 
 
39
 
40
+ } );
assets/js/admin-notice.min.js CHANGED
@@ -1,4 +1,4 @@
1
- jQuery(document).ready(function(){var notice=jQuery('[data-notice="fcf-admin-notice"]');var is_permanently=!1;if(!notice){return}
2
- function close_notice(){jQuery.ajax(notice.attr('data-notice-url'),{type:'POST',data:{action:notice.attr('data-notice-action'),is_permanently:(is_permanently)?1:0,},})}
3
- var notice_button_close=notice.find('.notice-dismiss');var notice_button_hide=notice.find('[data-notice-button]');if(!notice_button_close||!notice_button_hide){return}
4
- notice_button_close.click(close_notice);notice_button_hide.click(function(e){e.preventDefault();is_permanently=!0;notice_button_close.click()})})
1
+ jQuery(document).ready(function(){var notice_selector='[data-notice="fcf-admin-notice"]';var button_close_selector=notice_selector+' .notice-dismiss';var button_hide_selector=notice_selector+' [data-notice-button]';var notice=document.querySelector(notice_selector);if(!notice){return}
2
+ var close_notice=function(e,is_permanently){e.preventDefault();window.removeEventListener('click',close_event);jQuery.ajax(notice.getAttribute('data-notice-url'),{type:'POST',data:{action:notice.getAttribute('data-notice-action'),is_permanently:(is_permanently)?1:0,},})}
3
+ var close_event=function(e){if(e.target.matches(button_close_selector)){close_notice(e,!1)}else if(e.target.matches(button_hide_selector)){close_notice(e,!0);var button=document.querySelector(button_close_selector);button.click()}}
4
+ window.addEventListener('click',close_event)})
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.9.1
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-checkout-fields
@@ -11,7 +11,7 @@
11
  Requires at least: 4.9
12
  Tested up to: 5.6
13
  WC requires at least: 4.5
14
- WC tested up to: 4.9
15
  Requires PHP: 7.0
16
 
17
  Copyright 2017 WP Desk Ltd.
@@ -39,7 +39,7 @@ if ( ! defined( 'ABSPATH' ) ) {
39
 
40
 
41
  /* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
42
- $plugin_version = '2.9.1';
43
 
44
  /*
45
  * Update when conditions are met:
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.9.2
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-checkout-fields
11
  Requires at least: 4.9
12
  Tested up to: 5.6
13
  WC requires at least: 4.5
14
+ WC tested up to: 5.0
15
  Requires PHP: 7.0
16
 
17
  Copyright 2017 WP Desk Ltd.
39
 
40
 
41
  /* THIS VARIABLE CAN BE CHANGED AUTOMATICALLY */
42
+ $plugin_version = '2.9.2';
43
 
44
  /*
45
  * Update when conditions are met:
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: 2021-01-14T21:41:13+00:00\n"
11
- "PO-Revision-Date: 2021-01-14T21:41:13+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"
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: 2021-02-11T22:15:22+00:00\n"
11
+ "PO-Revision-Date: 2021-02-11T22:15:22+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"
readme.txt CHANGED
@@ -187,7 +187,10 @@ If you are upgrading from the old WooCommerce Checkout Fields version (1.1, wooc
187
 
188
  == Changelog ==
189
 
190
- = 2.9.1 - 2020-01-14 =
 
 
 
191
  * Updated hook for integration with FCF plugin
192
 
193
  = 2.9.0 - 2020-12-16 =
187
 
188
  == Changelog ==
189
 
190
+ = 2.9.2 - 2021-02-11 =
191
+ * Added support for WooCommerce 5.0
192
+
193
+ = 2.9.1 - 2021-01-14 =
194
  * Updated hook for integration with FCF plugin
195
 
196
  = 2.9.0 - 2020-12-16 =
src/Admin/NoticeReview.php CHANGED
@@ -65,7 +65,8 @@ class NoticeReview implements Hookable, HookablePluginDependant {
65
  $notice_date = strtotime( get_option( $option_notice, false ) );
66
  $min_date = strtotime( current_time( 'mysql' ) );
67
 
68
- if ( ( $notice_date !== false ) && ( $notice_date > $min_date ) ) {
 
69
  return;
70
  }
71
 
65
  $notice_date = strtotime( get_option( $option_notice, false ) );
66
  $min_date = strtotime( current_time( 'mysql' ) );
67
 
68
+ if ( ( basename( $_SERVER['PHP_SELF'] ) !== 'index.php' )
69
+ || ( ( $notice_date !== false ) && ( $notice_date > $min_date ) ) ) {
70
  return;
71
  }
72
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInita57522ed754e86f73b586831168be2e7::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitc47e3c4658fa0bb38014fd053b764aad::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInita57522ed754e86f73b586831168be2e7
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInita57522ed754e86f73b586831168be2e7
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInita57522ed754e86f73b586831168be2e7', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInita57522ed754e86f73b586831168be2e7', '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\ComposerStaticInita57522ed754e86f73b586831168be2e7::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 ComposerAutoloaderInitc47e3c4658fa0bb38014fd053b764aad
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInitc47e3c4658fa0bb38014fd053b764aad', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInitc47e3c4658fa0bb38014fd053b764aad', '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\ComposerStaticInitc47e3c4658fa0bb38014fd053b764aad::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 ComposerStaticInita57522ed754e86f73b586831168be2e7
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'W' =>
@@ -318,9 +318,9 @@ class ComposerStaticInita57522ed754e86f73b586831168be2e7
318
  public static function getInitializer(ClassLoader $loader)
319
  {
320
  return \Closure::bind(function () use ($loader) {
321
- $loader->prefixLengthsPsr4 = ComposerStaticInita57522ed754e86f73b586831168be2e7::$prefixLengthsPsr4;
322
- $loader->prefixDirsPsr4 = ComposerStaticInita57522ed754e86f73b586831168be2e7::$prefixDirsPsr4;
323
- $loader->classMap = ComposerStaticInita57522ed754e86f73b586831168be2e7::$classMap;
324
 
325
  }, null, ClassLoader::class);
326
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitc47e3c4658fa0bb38014fd053b764aad
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'W' =>
318
  public static function getInitializer(ClassLoader $loader)
319
  {
320
  return \Closure::bind(function () use ($loader) {
321
+ $loader->prefixLengthsPsr4 = ComposerStaticInitc47e3c4658fa0bb38014fd053b764aad::$prefixLengthsPsr4;
322
+ $loader->prefixDirsPsr4 = ComposerStaticInitc47e3c4658fa0bb38014fd053b764aad::$prefixDirsPsr4;
323
+ $loader->classMap = ComposerStaticInitc47e3c4658fa0bb38014fd053b764aad::$classMap;
324
 
325
  }, null, ClassLoader::class);
326
  }