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

Version Description

  • 2018-03-01 =
  • Fixed problems with deactivation plugin on multisite
  • Fixed some minor issues
Download this release

Release Info

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

Code changes from version 1.6 to 1.6.1

classes/tracker.php CHANGED
@@ -173,6 +173,12 @@ if ( ! class_exists( 'WPDesk_Flexible_Checkout_Fields_Tracker' ) ) {
173
  }
174
 
175
  public function activated_plugin( $plugin, $network_wide ) {
 
 
 
 
 
 
176
  if ( !wpdesk_tracker_enabled() ) {
177
  return;
178
  }
173
  }
174
 
175
  public function activated_plugin( $plugin, $network_wide ) {
176
+ if ( $network_wide ) {
177
+ return;
178
+ }
179
+ if ( defined( 'WP_CLI' ) && WP_CLI ) {
180
+ return;
181
+ }
182
  if ( !wpdesk_tracker_enabled() ) {
183
  return;
184
  }
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
@@ -34,7 +34,7 @@
34
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
35
 
36
  if ( ! defined( 'FCF_VERSION' ) ) {
37
- define( 'FCF_VERSION', '1.6' );
38
  }
39
 
40
 
@@ -519,7 +519,9 @@
519
  if ( isset( $new[$key][$field['name']]['custom_attributes'] ) ) {
520
  $custom_attributes = $new[$key][$field['name']]['custom_attributes'];
521
  }
522
- $custom_attributes['data-qa-id'] = $field['label'];
 
 
523
 
524
  $new[$key][$field['name']]['custom_attributes'] = apply_filters( 'flexible_checkout_fields_custom_attributes', $custom_attributes, $field );
525
  }
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.1
7
  Author: WP Desk
8
  Author URI: https://www.wpdesk.net/
9
  Text Domain: flexible-checkout-fields
34
  if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
35
 
36
  if ( ! defined( 'FCF_VERSION' ) ) {
37
+ define( 'FCF_VERSION', '1.6.1' );
38
  }
39
 
40
 
519
  if ( isset( $new[$key][$field['name']]['custom_attributes'] ) ) {
520
  $custom_attributes = $new[$key][$field['name']]['custom_attributes'];
521
  }
522
+ if ( isset( $field['label'] ) ) {
523
+ $custom_attributes['data-qa-id'] = $field['label'];
524
+ }
525
 
526
  $new[$key][$field['name']]['custom_attributes'] = apply_filters( 'flexible_checkout_fields_custom_attributes', $custom_attributes, $field );
527
  }
inc/wpdesk-tracker/class-wpdesk-tracker.php CHANGED
@@ -3,7 +3,7 @@
3
  * WP Desk Tracker
4
  *
5
  * @class WPDESK_Tracker
6
- * @version 1.3.1
7
  * @package WPDESK/Helper
8
  * @category Class
9
  * @author WP Desk
@@ -32,7 +32,7 @@ if ( !class_exists( 'WPDesk_Tracker' ) ) {
32
  * @var string
33
  */
34
  private static $api_url = 'https://data.wpdesk.org/?track=1';
35
- //private static $api_url = 'http://woo271.grola.pl/?track=1';
36
 
37
  /**
38
  * Hook into cron event.
@@ -62,6 +62,10 @@ if ( !class_exists( 'WPDesk_Tracker' ) ) {
62
 
63
  add_filter( 'wpdesk_tracker_data', array( __CLASS__, 'wpdesk_tracker_message_version' ) );
64
 
 
 
 
 
65
  global $pagenow;
66
  if ( 'plugins.php' === $pagenow ) {
67
  add_action( 'admin_footer', array( __CLASS__, 'admin_footer' ) );
@@ -69,6 +73,35 @@ if ( !class_exists( 'WPDesk_Tracker' ) ) {
69
 
70
  }
71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  public static function init_schedule() {
73
  $options = get_option( 'wpdesk_helper_options' );
74
  if ( !is_array( $options ) ) {
@@ -92,7 +125,7 @@ if ( !class_exists( 'WPDesk_Tracker' ) ) {
92
  }
93
 
94
  public static function admin_footer() {
95
- if ( wpdesk_tracker_enabled() && !apply_filters( 'wpdesk_tracker_do_not_ask', false ) ) {
96
  $plugins = array(
97
  'wpdesk-helper/wpdesk-helper.php' => 'wpdesk-helper/wpdesk-helper.php'
98
  );
@@ -459,7 +492,8 @@ if ( !class_exists( 'WPDesk_Tracker' ) ) {
459
  if ( !empty( $_REQUEST['additional_info'] ) ) {
460
  $params['additional_info'] = $_REQUEST['additional_info'];
461
  }
462
- $response = wp_remote_post( self::$api_url, array(
 
463
  'method' => 'POST',
464
  'timeout' => 5,
465
  'redirection' => 5,
@@ -537,7 +571,10 @@ if ( !class_exists( 'WPDesk_Tracker' ) ) {
537
  else {
538
  $params = array( 'click_action' => 'no' );
539
  if ( self::$dismiss_coupon ) {
540
- $params = array( 'click_action' => 'no_coupon' );
 
 
 
541
  }
542
  $params['url'] = home_url();
543
  }
@@ -547,7 +584,7 @@ if ( !class_exists( 'WPDesk_Tracker' ) ) {
547
  $params['localhost'] = 'yes';
548
  }
549
 
550
- $response = wp_remote_post( self::$api_url, array(
551
  'method' => 'POST',
552
  'timeout' => 5,
553
  'redirection' => 5,
@@ -558,6 +595,7 @@ if ( !class_exists( 'WPDesk_Tracker' ) ) {
558
  'cookies' => array(),
559
  )
560
  );
 
561
  }
562
 
563
  /**
3
  * WP Desk Tracker
4
  *
5
  * @class WPDESK_Tracker
6
+ * @version 1.3.2
7
  * @package WPDESK/Helper
8
  * @category Class
9
  * @author WP Desk
32
  * @var string
33
  */
34
  private static $api_url = 'https://data.wpdesk.org/?track=1';
35
+ private static $test_api_url = 'https://testdata.wpdesk.org/?track=1';
36
 
37
  /**
38
  * Hook into cron event.
62
 
63
  add_filter( 'wpdesk_tracker_data', array( __CLASS__, 'wpdesk_tracker_message_version' ) );
64
 
65
+ add_action( 'admin_bar_menu', array( __CLASS__, 'admin_bar_menu' ), 999 );
66
+ add_action( 'wp_head', array( __CLASS__, 'wp_head' ), 999 );
67
+ add_action( 'admin_head', array( __CLASS__, 'wp_head' ), 999 );
68
+
69
  global $pagenow;
70
  if ( 'plugins.php' === $pagenow ) {
71
  add_action( 'admin_footer', array( __CLASS__, 'admin_footer' ) );
73
 
74
  }
75
 
76
+ public static function get_api_url() {
77
+ $api_url = self::$api_url;
78
+ if ( apply_filters( 'wpdesk_tracker_use_testdata', false ) ) {
79
+ $api_url = self::$test_api_url;
80
+ }
81
+ return $api_url;
82
+ }
83
+
84
+ public static function wp_head() {
85
+ if ( apply_filters( 'wpdesk_tracker_use_testdata', false ) && apply_filters( 'wpdesk_tracker_show_testdata', false ) ) {
86
+ include( 'views/tracker-styles.php' );
87
+ }
88
+ }
89
+
90
+ /**
91
+ * @param WP_Admin_Bar $wp_admin_bar
92
+ */
93
+ public static function admin_bar_menu( $wp_admin_bar ) {
94
+ if ( apply_filters( 'wpdesk_tracker_use_testdata', false ) && apply_filters( 'wpdesk_tracker_show_testdata', false ) ) {
95
+ $args = array(
96
+ 'id' => 'my_page',
97
+ 'title' => 'WP Desk Test!',
98
+ 'meta' => array( 'class' => 'wpdesk-tracker-test' )
99
+ );
100
+ $wp_admin_bar->add_node( $args );
101
+ }
102
+ }
103
+
104
+
105
  public static function init_schedule() {
106
  $options = get_option( 'wpdesk_helper_options' );
107
  if ( !is_array( $options ) ) {
125
  }
126
 
127
  public static function admin_footer() {
128
+ if ( !is_network_admin() && wpdesk_tracker_enabled() && !apply_filters( 'wpdesk_tracker_do_not_ask', false ) ) {
129
  $plugins = array(
130
  'wpdesk-helper/wpdesk-helper.php' => 'wpdesk-helper/wpdesk-helper.php'
131
  );
492
  if ( !empty( $_REQUEST['additional_info'] ) ) {
493
  $params['additional_info'] = $_REQUEST['additional_info'];
494
  }
495
+
496
+ $response = wp_remote_post( self::get_api_url(), array(
497
  'method' => 'POST',
498
  'timeout' => 5,
499
  'redirection' => 5,
571
  else {
572
  $params = array( 'click_action' => 'no' );
573
  if ( self::$dismiss_coupon ) {
574
+ $params = array(
575
+ 'click_action' => 'no_coupon',
576
+ );
577
+ $params['message_version'] = self::$message_version;
578
  }
579
  $params['url'] = home_url();
580
  }
584
  $params['localhost'] = 'yes';
585
  }
586
 
587
+ $response = wp_remote_post( self::get_api_url(), array(
588
  'method' => 'POST',
589
  'timeout' => 5,
590
  'redirection' => 5,
595
  'cookies' => array(),
596
  )
597
  );
598
+
599
  }
600
 
601
  /**
inc/wpdesk-tracker/views/tracker-styles.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <style>
2
+ .wpdesk-tracker-test div {
3
+ color: yellow !important;
4
+ }
5
+ </style>
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.4
7
- Stable tag: 1.6
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -186,6 +186,10 @@ If you are upgrading from the old WooCommerce Checkout Fields version (1.1, wooc
186
 
187
  == Changelog ==
188
 
 
 
 
 
189
  = 1.6 - 2018-01-21 =
190
  * Added the option of disabling the display of fields in the Thank You Page and Emails, My Account
191
  * Added protection removing the field and resetting the section settings
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.4
7
+ Stable tag: 1.6.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
186
 
187
  == Changelog ==
188
 
189
+ = 1.6.1 - 2018-03-01 =
190
+ * Fixed problems with deactivation plugin on multisite
191
+ * Fixed some minor issues
192
+
193
  = 1.6 - 2018-01-21 =
194
  * Added the option of disabling the display of fields in the Thank You Page and Emails, My Account
195
  * Added protection removing the field and resetting the section settings