WooCommerce Checkout Manager - Version 6.2.3

Version Description

Download this release

Release Info

Developer quadlayers
Plugin Icon 128x128 WooCommerce Checkout Manager
Version 6.2.3
Comparing to
See all releases

Code changes from version 6.2.2 to 6.2.3

includes/class-wooccm-install.php DELETED
@@ -1,95 +0,0 @@
1
- <?php
2
-
3
- class WOOCCM_Install
4
- {
5
-
6
- public static function install()
7
- {
8
-
9
- // Check if we are not already running this routine.
10
- if ('yes' === get_transient('wooccm_installing')) {
11
- return;
12
- }
13
-
14
- // If we made it till here nothing is running yet, lets set the transient now.
15
- set_transient('wooccm_installing', 'yes', MINUTE_IN_SECONDS * 10);
16
- set_transient('wooccm-notice-delay', true, MONTH_IN_SECONDS);
17
-
18
- //wooccm_install();
19
- }
20
-
21
- public static function update()
22
- {
23
-
24
- if (!get_option('wooccm_billing', false)) {
25
- update_option(WOOCCM()->billing->get_fields());
26
- }
27
-
28
- if (!get_option('wooccm_shipping', false)) {
29
- update_option(WOOCCM()->shipping->get_fields());
30
- }
31
-
32
- if (!get_option('wooccm_additional', false)) {
33
- update_option(WOOCCM()->additional->get_fields());
34
- }
35
- }
36
-
37
- public static function old_panel_compatibility($field_id, $field = array())
38
- {
39
-
40
- $field = $this->get_old_args($field);
41
-
42
- $field = wp_parse_args($field, array_fill_keys($this->old_args, null));
43
-
44
- if (!is_numeric($field['order'])) {
45
- $field['order'] = $field_id + 1;
46
- }
47
-
48
- $field['type'] = $this->get_old_type($field['type']);
49
-
50
- if (empty($field['position']) && isset($field['class'])) {
51
- if ($position = $this->array_to_string(array_intersect((array) $field['class'], array('form-row-wide', 'form-row-first', 'form-row-last')))) {
52
- $field['position'] = $position;
53
- }
54
- }
55
-
56
- $field['role_option'] = $this->array_to_string($field['role_option']);
57
- $field['role_option2'] = $this->array_to_string($field['role_option2']);
58
- //$field['option_array'] = $this->array_to_string($field['option_array']);
59
- $field['single_p'] = $this->array_to_string($field['single_p']);
60
- $field['single_px'] = $this->array_to_string($field['single_px']);
61
- $field['single_p_cat'] = $this->array_to_string($field['single_p_cat']);
62
- $field['single_px_cat'] = $this->array_to_string($field['single_px_cat']);
63
- $field['tax_remove'] = !$field['tax_remove'];
64
-
65
- // Days
66
- if (is_array($field['days_disabler'])) {
67
- foreach ($field['days_disabler'] as $day_index => $day) {
68
- $field['days_disabler' . strval($day_index)] = 1;
69
- }
70
- $field['days_disabler'] = 1;
71
- unset($field['date_limit_days']);
72
- }
73
-
74
- // Dates
75
- if (!empty($field['date_limit_fixed_min'])) {
76
-
77
- $min = explode('-', $field['date_limit_fixed_min']);
78
-
79
- $field['single_yy'] = $min[0];
80
- $field['single_mm'] = $min[1];
81
- $field['single_dd'] = $min[2];
82
- }
83
-
84
- if (!empty($field['date_limit_fixed_max'])) {
85
-
86
- $max = explode('-', $field['date_limit_fixed_max']);
87
-
88
- $field['single_max_yy'] = $max[0];
89
- $field['single_max_mm'] = $max[1];
90
- $field['single_max_dd'] = $max[2];
91
- }
92
-
93
- return array_intersect_key($field, array_flip($this->old_args));
94
- }
95
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
includes/class-wooccm.php CHANGED
@@ -2,14 +2,9 @@
2
 
3
  final class WOOCCM {
4
 
5
-
6
  protected static $_instance;
7
 
8
  public function __construct() {
9
- include_once WOOCCM_PLUGIN_DIR . 'includes/class-wooccm-install.php';
10
- include_once WOOCCM_PLUGIN_DIR . 'includes/class-wooccm-notices.php';
11
-
12
- register_activation_hook( WOOCCM_PLUGIN_FILE, array( 'WOOCCM_Install', 'install' ) );
13
 
14
  load_plugin_textdomain( 'woocommerce-checkout-manager', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
15
 
2
 
3
  final class WOOCCM {
4
 
 
5
  protected static $_instance;
6
 
7
  public function __construct() {
 
 
 
 
8
 
9
  load_plugin_textdomain( 'woocommerce-checkout-manager', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
10
 
includes/quadlayers/links.php ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class WOOCCM_Admin_Links {
4
+
5
+ protected static $_instance;
6
+
7
+ function __construct() {
8
+ add_filter( 'plugin_action_links_' . WOOCCM_PLUGIN_BASENAME, array( $this, 'add_action_links' ) );
9
+ }
10
+
11
+ public function add_action_links( $links ) {
12
+ $links[] = '<a target="_blank" href="' . WOOCCM_DEMO_URL . '">' . esc_html__( 'Documentation', 'woocommerce-checkout-manager' ) . '</a>';
13
+ $links[] = '<a target="_blank" href="' . WOOCCM_SUPPORT_URL . '">' . esc_html__( 'Support', 'woocommerce-checkout-manager' ) . '</a>';
14
+ return $links;
15
+ }
16
+
17
+ public static function instance() {
18
+ if ( is_null( self::$_instance ) ) {
19
+ self::$_instance = new self();
20
+ }
21
+ return self::$_instance;
22
+ }
23
+
24
+ }
25
+
26
+ WOOCCM_Admin_Links::instance();
includes/{class-wooccm-notices.php → quadlayers/notices.php} RENAMED
@@ -7,17 +7,10 @@ class WOOCCM_Notices {
7
  public function __construct() {
8
  add_action( 'wp_ajax_wooccm_dismiss_notice', array( $this, 'ajax_dismiss_notice' ) );
9
  add_action( 'admin_notices', array( $this, 'add_notices' ) );
10
- add_filter( 'plugin_action_links_' . plugin_basename( WOOCCM_PLUGIN_FILE ), array( $this, 'add_action_links' ) );
11
  }
12
 
13
- public static function instance() {
14
- if ( is_null( self::$_instance ) ) {
15
- self::$_instance = new self();
16
- }
17
- return self::$_instance;
18
- }
19
-
20
- public function ajax_dismiss_notice() {
21
  if ( check_admin_referer( 'wooccm_dismiss_notice', 'nonce' ) && isset( $_REQUEST['notice_id'] ) ) {
22
 
23
  $notice_id = sanitize_key( $_REQUEST['notice_id'] );
@@ -31,7 +24,11 @@ class WOOCCM_Notices {
31
  wp_die();
32
  }
33
 
34
- public function add_notices() {
 
 
 
 
35
 
36
  $transient = get_transient( 'wooccm-notice-delay' );
37
 
@@ -64,8 +61,10 @@ class WOOCCM_Notices {
64
  </script>
65
  <?php
66
 
 
 
67
  $user_rating = ! get_user_meta( get_current_user_id(), 'wooccm-user-rating', true );
68
- $user_premium = ! get_user_meta( get_current_user_id(), 'wooccm-user-premium', true ) && ! $this->is_installed( 'woocommerce-checkout-manager-pro/woocommerce-checkout-manager-pro.php' );
69
  $user_cross_sell = ! get_user_meta( get_current_user_id(), 'wooccm-user-cross-sell', true );
70
 
71
  if ( $user_rating ) {
@@ -108,14 +107,14 @@ class WOOCCM_Notices {
108
  <?php
109
  printf(
110
  esc_html__( 'Today we want to make you a special gift. Using this coupon before the next 48 hours you can get a 20 percent discount on the premium version of the %s plugin.', 'woocommerce-checkout-manager' ),
111
- esc_html( WOOCCM_PLUGIN_NAME )
112
  )
113
  ?>
114
  </p>
115
- <a href="<?php echo esc_url( WOOCCM_PURCHASE_URL ); ?>" class="button-primary" target="_blank">
116
  <?php esc_html_e( 'More info', 'woocommerce-checkout-manager' ); ?>
117
  </a>
118
- <input style="width:95px" type="text" value="ADMINPANEL20%"/>
119
  </div>
120
  </div>
121
  </div>
@@ -131,7 +130,7 @@ class WOOCCM_Notices {
131
  return;
132
  }
133
 
134
- list($title, $description, $link, $action, $action_link) = $cross_sell;
135
 
136
  ?>
137
  <div class="wooccm-notice notice notice-info is-dismissible" data-notice_id="wooccm-user-cross-sell">
@@ -141,14 +140,14 @@ class WOOCCM_Notices {
141
  </div>
142
  <div class="notice-content" style="margin-left: 15px;">
143
  <p>
144
- <?php printf( esc_html__( 'Hello! We want to invite you to try our %s plugin!', 'woocommerce-checkout-manager' ), $title ); ?>
145
  <br/>
146
- <?php echo esc_html( $description ); ?>
147
  </p>
148
  <a href="<?php echo esc_url( $action_link ); ?>" class="button-primary">
149
  <?php echo esc_html( $action ); ?>
150
  </a>
151
- <a href="<?php echo esc_url( $link ); ?>" class="button-secondary" target="_blank">
152
  <?php esc_html_e( 'More info', 'woocommerce-checkout-manager' ); ?>
153
  </a>
154
  </div>
@@ -162,17 +161,13 @@ class WOOCCM_Notices {
162
 
163
  function get_cross_sell() {
164
 
165
- $title = 'Direct Checkout';
166
- $description = esc_html__( 'Direct Checkout for WooCommerce allows you to reduce the steps in the checkout process by skipping the shopping cart page. This can encourage buyers to shop more and quickly. You will increase your sales reducing cart abandonment.', 'woocommerce-checkout-manager' );
167
- $link = 'https://quadlayers.com/portfolio/woocommerce-direct-checkout/?utm_source=wooccm_admin';
168
-
169
  $screen = get_current_screen();
170
 
171
  if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) {
172
  return array();
173
  }
174
 
175
- $plugin_slug = 'woocommerce-direct-checkout';
176
 
177
  $plugin_file = "{$plugin_slug}/{$plugin_slug}.php";
178
 
@@ -187,9 +182,6 @@ class WOOCCM_Notices {
187
  }
188
 
189
  return array(
190
- $title,
191
- $description,
192
- $link,
193
  esc_html__( 'Activate', 'woocommerce-checkout-manager' ),
194
  wp_nonce_url( "plugins.php?action=activate&amp;plugin={$plugin_file}&amp;plugin_status=all&amp;paged=1", "activate-plugin_{$plugin_file}" ),
195
  );
@@ -201,9 +193,6 @@ class WOOCCM_Notices {
201
  }
202
 
203
  return array(
204
- $title,
205
- $description,
206
- $link,
207
  esc_html__( 'Install', 'woocommerce-checkout-manager' ),
208
  wp_nonce_url( self_admin_url( "update.php?action=install-plugin&plugin={$plugin_slug}" ), "install-plugin_{$plugin_slug}" ),
209
  );
@@ -217,12 +206,12 @@ class WOOCCM_Notices {
217
  return isset( $installed_plugins[ $path ] );
218
  }
219
 
220
- function add_action_links( $links ) {
221
- $links[] = '<a target="_blank" href="' . WOOCCM_PURCHASE_URL . '">' . esc_html__( 'Premium', 'woocommerce-checkout-manager' ) . '</a>';
222
- $links[] = '<a href="' . admin_url( 'admin.php?page=wc-settings&tab=' . sanitize_title( WOOCCM_PREFIX ) ) . '">' . esc_html__( 'Settings', 'woocommerce-checkout-manager' ) . '</a>';
223
- return $links;
 
224
  }
225
-
226
  }
227
 
228
  WOOCCM_Notices::instance();
7
  public function __construct() {
8
  add_action( 'wp_ajax_wooccm_dismiss_notice', array( $this, 'ajax_dismiss_notice' ) );
9
  add_action( 'admin_notices', array( $this, 'add_notices' ) );
10
+ register_activation_hook( WOOCCM_PLUGIN_FILE, array( $this, 'add_transient' ) );
11
  }
12
 
13
+ function ajax_dismiss_notice() {
 
 
 
 
 
 
 
14
  if ( check_admin_referer( 'wooccm_dismiss_notice', 'nonce' ) && isset( $_REQUEST['notice_id'] ) ) {
15
 
16
  $notice_id = sanitize_key( $_REQUEST['notice_id'] );
24
  wp_die();
25
  }
26
 
27
+ function add_transient() {
28
+ set_transient( 'wooccm-notice-delay', true, MONTH_IN_SECONDS );
29
+ }
30
+
31
+ function add_notices() {
32
 
33
  $transient = get_transient( 'wooccm-notice-delay' );
34
 
61
  </script>
62
  <?php
63
 
64
+ $plugin_slug = WOOCCM_PREMIUM_SELL_SLUG;
65
+
66
  $user_rating = ! get_user_meta( get_current_user_id(), 'wooccm-user-rating', true );
67
+ $user_premium = ! get_user_meta( get_current_user_id(), 'wooccm-user-premium', true ) && ! $this->is_installed( "{$plugin_slug}/{$plugin_slug}.php" );
68
  $user_cross_sell = ! get_user_meta( get_current_user_id(), 'wooccm-user-cross-sell', true );
69
 
70
  if ( $user_rating ) {
107
  <?php
108
  printf(
109
  esc_html__( 'Today we want to make you a special gift. Using this coupon before the next 48 hours you can get a 20 percent discount on the premium version of the %s plugin.', 'woocommerce-checkout-manager' ),
110
+ esc_html( WOOCCM_PREMIUM_SELL_NAME )
111
  )
112
  ?>
113
  </p>
114
+ <a href="<?php echo esc_url( WOOCCM_PREMIUM_SELL_URL ); ?>" class="button-primary" target="_blank">
115
  <?php esc_html_e( 'More info', 'woocommerce-checkout-manager' ); ?>
116
  </a>
117
+ <input style="width:130px" type="text" value="ADMINPANEL20%"/>
118
  </div>
119
  </div>
120
  </div>
130
  return;
131
  }
132
 
133
+ list($action, $action_link) = $cross_sell;
134
 
135
  ?>
136
  <div class="wooccm-notice notice notice-info is-dismissible" data-notice_id="wooccm-user-cross-sell">
140
  </div>
141
  <div class="notice-content" style="margin-left: 15px;">
142
  <p>
143
+ <?php printf( esc_html__( 'Hello! We want to invite you to try our %s plugin!', 'woocommerce-checkout-manager' ), esc_html( WOOCCM_CROSS_INSTALL_NAME ) ); ?>
144
  <br/>
145
+ <?php echo esc_html( WOOCCM_CROSS_INSTALL_DESCRIPTION ); ?>
146
  </p>
147
  <a href="<?php echo esc_url( $action_link ); ?>" class="button-primary">
148
  <?php echo esc_html( $action ); ?>
149
  </a>
150
+ <a href="<?php echo esc_url( WOOCCM_CROSS_INSTALL_URL ); ?>" class="button-secondary" target="_blank">
151
  <?php esc_html_e( 'More info', 'woocommerce-checkout-manager' ); ?>
152
  </a>
153
  </div>
161
 
162
  function get_cross_sell() {
163
 
 
 
 
 
164
  $screen = get_current_screen();
165
 
166
  if ( isset( $screen->parent_file ) && 'plugins.php' === $screen->parent_file && 'update' === $screen->id ) {
167
  return array();
168
  }
169
 
170
+ $plugin_slug = WOOCCM_CROSS_INSTALL_SLUG;
171
 
172
  $plugin_file = "{$plugin_slug}/{$plugin_slug}.php";
173
 
182
  }
183
 
184
  return array(
 
 
 
185
  esc_html__( 'Activate', 'woocommerce-checkout-manager' ),
186
  wp_nonce_url( "plugins.php?action=activate&amp;plugin={$plugin_file}&amp;plugin_status=all&amp;paged=1", "activate-plugin_{$plugin_file}" ),
187
  );
193
  }
194
 
195
  return array(
 
 
 
196
  esc_html__( 'Install', 'woocommerce-checkout-manager' ),
197
  wp_nonce_url( self_admin_url( "update.php?action=install-plugin&plugin={$plugin_slug}" ), "install-plugin_{$plugin_slug}" ),
198
  );
206
  return isset( $installed_plugins[ $path ] );
207
  }
208
 
209
+ public static function instance() {
210
+ if ( is_null( self::$_instance ) ) {
211
+ self::$_instance = new self();
212
+ }
213
+ return self::$_instance;
214
  }
 
215
  }
216
 
217
  WOOCCM_Notices::instance();
includes/view/frontend/class-wooccm-fields-filters.php CHANGED
@@ -1,319 +1,300 @@
1
  <?php
2
 
3
- class WOOCCM_Fields_Filter
4
- {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
- protected static $_instance;
7
- public $count = 0;
8
-
9
- public function __construct()
10
- {
11
- $this->init();
12
- }
13
-
14
- public static function instance()
15
- {
16
- if (is_null(self::$_instance)) {
17
- self::$_instance = new self();
18
- }
19
- return self::$_instance;
20
- }
21
-
22
- // Custom fields
23
- // ---------------------------------------------------------------------------
24
- public function custom_field($field, $key, $args, $value = null)
25
- {
26
-
27
- $field = '';
28
-
29
- if ($args['required']) {
30
- //$args['class'][] = 'validate-required';
31
- $required = '&nbsp;<abbr class="required" title="' . esc_attr__('required', 'woocommerce-checkout-manager') . '">*</abbr>';
32
- } else {
33
- $required = '&nbsp;<span class="optional">(' . esc_html__('optional', 'woocommerce-checkout-manager') . ')</span>';
34
- }
35
-
36
- if (is_string($args['label_class'])) {
37
- $args['label_class'] = array($args['label_class']);
38
- }
39
 
40
- //if (is_null($value)) {
41
- if (!$value) {
42
- $value = $args['default'];
43
- }
44
 
45
- // Custom attribute handling.
46
- $custom_attributes = array();
47
- $args['custom_attributes'] = array_filter((array) $args['custom_attributes'], 'strlen');
48
 
49
- if ($args['maxlength']) {
50
- $args['custom_attributes']['maxlength'] = absint($args['maxlength']);
51
- }
52
 
53
- if (!empty($args['autocomplete'])) {
54
- $args['custom_attributes']['autocomplete'] = $args['autocomplete'];
55
- }
56
 
57
- if (true === $args['autofocus']) {
58
- $args['custom_attributes']['autofocus'] = 'autofocus';
59
- }
 
 
60
 
61
- if ($args['description']) {
62
- $args['custom_attributes']['aria-describedby'] = $args['id'] . '-description';
63
- }
 
 
64
 
65
- if (!empty($args['custom_attributes']) && is_array($args['custom_attributes'])) {
66
- foreach ($args['custom_attributes'] as $attribute => $attribute_value) {
67
- $custom_attributes[] = esc_attr($attribute) . '="' . esc_attr($attribute_value) . '"';
68
- }
69
- }
70
 
71
- if (!empty($args['validate'])) {
72
- foreach ($args['validate'] as $validate) {
73
- $args['class'][] = 'validate-' . $validate;
74
- }
75
- }
76
 
77
- //$field = '';
78
- $label_id = $args['id'];
79
- $sort = $args['priority'] ? $args['priority'] : '';
80
- $field_container = '<p class="form-row %1$s" id="%2$s" data-priority="' . esc_attr($sort) . '">%3$s</p>';
81
- switch ($args['type']) {
82
 
83
- case 'radio':
84
- $field = '';
85
 
86
- if (!empty($args['options'])) {
 
 
 
 
87
 
88
- $field .= ' <span class="woocommerce-radio-wrapper" ' . implode(' ', $custom_attributes) . '>';
 
89
 
90
- foreach ($args['options'] as $option_key => $option_text) {
91
- $option_key = is_numeric($option_key) ? $option_text : $option_key;
92
- $field .= '<input type="radio" class="input-checkbox" value="' . esc_attr($option_key) . '" name="' . esc_attr($key) . '" id="' . esc_attr($key) . '_' . esc_attr($option_key) . '"' . checked($value, $option_text, false) . ' />';
93
- $field .= '<label for="' . esc_attr($key) . '_' . esc_attr($option_key) . '" class="checkbox ' . implode(' ', $args['label_class']) . '">' . $option_text . '</label><br>';
94
- }
95
 
96
- $field .= ' </span>';
97
- }
98
 
99
- break;
 
 
 
 
 
 
 
 
 
 
100
 
101
- case 'select':
102
 
103
- $field = '';
 
104
 
105
- if (!empty($args['options'])) {
106
- $field .= '<select name="' . esc_attr($key) . '" id="' . esc_attr($args['id']) . '" class="select ' . esc_attr(implode(' ', $args['input_class'])) . '" ' . implode(' ', $custom_attributes) . ' data-placeholder="' . esc_attr($args['placeholder']) . '">';
107
- if (!empty($args['placeholder'])) {
108
- $field .= '<option value="" disabled="disabled" selected="selected">' . esc_attr($args['placeholder']) . '</option>';
109
- }
110
- foreach ($args['options'] as $option_key => $option_text) {
111
- $option_key = is_numeric($option_key) ? $option_text : $option_key;
112
- $field .= '<option value="' . esc_attr($option_key) . '" ' . selected($value, $option_text, false) . '>' . esc_attr($option_text) . '</option>';
113
- }
114
- $field .= '</select>';
115
- }
116
 
117
- break;
 
 
 
 
 
 
 
118
 
119
- case 'multiselect':
120
 
121
- $field = '';
 
122
 
123
- $value = is_array($value) ? $value : array_map('trim', (array) explode(',', $value));
124
 
125
- if (!empty($args['options'])) {
126
- $field .= '<select name="' . esc_attr($key) . '[]" id="' . esc_attr($key) . '" class="select ' . esc_attr(implode(' ', $args['input_class'])) . '" multiple="multiple" ' . implode(' ', $custom_attributes) . '>';
127
- foreach ($args['options'] as $option_key => $option_text) {
128
- $option_key = is_numeric($option_key) ? $option_text : $option_key;
129
- $field .= '<option value="' . esc_attr($option_key) . '" ' . selected(in_array($option_text, $value), 1, false) . '>' . esc_attr($option_text) . '</option>';
130
- }
131
- $field .= ' </select>';
132
- }
133
 
134
- break;
135
 
136
- case 'multicheckbox':
 
 
 
137
 
138
- $field = '';
 
139
 
140
- $value = is_array($value) ? $value : array_map('trim', (array) explode(',', $value));
141
 
142
- if (!empty($args['options'])) {
 
143
 
144
- $field .= ' <span class="woocommerce-multicheckbox-wrapper" ' . implode(' ', $custom_attributes) . '>';
 
 
 
 
145
 
146
- foreach ($args['options'] as $option_key => $option_text) {
147
- $option_key = is_numeric($option_key) ? $option_text : $option_key;
148
- $field .= '<label><input type="checkbox" name="' . esc_attr($key) . '[]" value="' . esc_attr($option_key) . '"' . checked(in_array($option_text, $value), 1, false) . ' /> ' . esc_attr($option_text) . '</label>';
149
- }
150
 
151
- $field .= '</span>';
152
- }
153
 
154
- break;
 
 
155
 
156
- case 'file':
157
 
158
- $field = '';
 
 
159
 
160
- $field .= '<button style="width:100%" class="wooccm-file-button button alt" type="button" class="button alt" id="' . esc_attr($key) . '_button">' . esc_html($args['placeholder']) . '</button>';
161
- //$field .= '<input class="wooccm-file-field" type="text" name="' . esc_attr($key) . '" id="' . esc_attr($key) . '" value="test" />';
162
- $field .= '<input class="wooccm-file-field" type="hidden" name="' . esc_attr($key) . '" id="' . esc_attr($args['id']) . '" value="" ' . implode(' ', $custom_attributes) . ' />';
163
- $field .= '<input style="display:none;" class="fileinput-button" type="file" name="' . esc_attr($key) . '_file" id="' . esc_attr($key) . '_file" multiple="multiple" />';
164
- $field .= '<span style="display:none;" class="wooccm-file-list"></span>';
165
 
166
- break;
167
- }
 
 
168
 
169
- if (!empty($field)) {
170
- $field_html = '';
171
 
172
- if ($args['label'] && 'checkbox' !== $args['type']) {
173
- $field_html .= '<label for="' . esc_attr($label_id) . '" class="' . esc_attr(implode(' ', $args['label_class'])) . '">' . $args['label'] . $required . '</label>';
174
- }
 
 
175
 
176
- $field_html .= '<span class="woocommerce-input-wrapper">' . $field;
 
 
 
 
177
 
178
- if ($args['description']) {
179
- $field_html .= '<span class="description" id="' . esc_attr($args['id']) . '-description" aria-hidden="true">' . wp_kses_post($args['description']) . '</span>';
180
- }
181
 
182
- $field_html .= '</span>';
183
 
184
- $container_class = esc_attr(implode(' ', $args['class']));
185
- $container_id = esc_attr($args['id']) . '_field';
186
- $field = sprintf($field_container, $container_class, $container_id, $field_html);
187
- }
188
 
189
- return $field;
190
- }
191
 
192
- // Heading
193
- // ---------------------------------------------------------------------------
194
- public function heading_field($field, $key, $args, $value = null)
195
- {
 
196
 
197
- // Custom attribute handling.
198
- $custom_attributes = array();
199
 
200
- if (!empty($args['custom_attributes']) && is_array($args['custom_attributes'])) {
201
- foreach ($args['custom_attributes'] as $attribute => $attribute_value) {
202
- $custom_attributes[] = esc_attr($attribute) . '="' . esc_attr($attribute_value) . '"';
203
- }
204
- }
205
 
206
- $sort = $args['priority'] ? $args['priority'] : '';
207
 
208
- $field_html = '<h3 ' . implode(' ', $custom_attributes) . '>' . esc_html($args['label']) . '</h3>';
209
 
210
- $container_class = esc_attr(implode(' ', $args['class']));
211
- $container_id = esc_attr($args['id']) . '_field';
212
- $field_container = '<div class="form-row %1$s" id="%2$s" data-priority="' . esc_attr($sort) . '">%3$s</div>';
213
 
214
- return sprintf($field_container, $container_class, $container_id, $field_html);
215
- }
 
 
216
 
217
- // Colorpicker
218
- // ---------------------------------------------------------------------------
219
- public function colorpicker_field($field = '', $key = '', $args = [], $value = null)
220
- {
221
 
222
- $args['type'] = 'text';
223
- $args['maxlength'] = 7;
224
 
225
- ob_start();
226
 
227
- woocommerce_form_field($key, $args, $value);
 
 
228
 
229
- $field = ob_get_clean();
230
 
231
- $field = str_replace('</p>', ' <span class="wooccmcolorpicker_container" class="spec_shootd"></span></p>', $field);
232
 
233
- return $field;
234
- }
235
 
236
- // Country
237
- // ---------------------------------------------------------------------------
238
- public function country_field($field = '', $key = '', $args = [], $value = null)
239
- {
240
 
241
- static $instance = 0;
 
 
242
 
243
- if ($instance) {
244
- return $field;
245
- }
246
 
247
- $instance++;
248
 
249
- ob_start();
 
 
250
 
251
- if (!empty($args['default'])) {
252
- $value = $args['default'];
253
- }
254
 
255
- woocommerce_form_field($key, $args, $value);
256
 
257
- $field = ob_get_clean();
 
258
 
259
- return $field;
260
- }
261
 
262
- // State
263
- // ---------------------------------------------------------------------------
264
- public function state_field($field = '', $key = '', $args = [], $value = null)
265
- {
266
 
267
- static $instance = 0;
268
 
269
- if ($instance) {
270
- return $field;
271
- }
272
 
273
- $instance++;
 
274
 
275
- ob_start();
276
-
277
- if (!empty($args['default'])) {
278
- $value = $args['default'];
279
- }
280
-
281
- woocommerce_form_field($key, $args, $value);
282
-
283
- $field = ob_get_clean();
284
-
285
- return $field;
286
- }
287
-
288
- public function hidden_field($field = '', $key = '', $args = [], $value = null)
289
- {
290
-
291
- static $instance = 0;
292
-
293
- if ($instance) {
294
- return $field;
295
- }
296
-
297
- $instance++;
298
-
299
- $field .= '<input type="hidden" name="' . esc_attr($key) . '" id="' . esc_attr($args['id']) . '" value="' . esc_html($value) . '" ' . implode(' ', $args['custom_attributes']) . ' readonly="readonly" />';
300
-
301
- return $field;
302
- }
303
-
304
- public function init()
305
- {
306
- add_filter('woocommerce_form_field_radio', array($this, 'custom_field'), 10, 4);
307
- add_filter('woocommerce_form_field_multicheckbox', array($this, 'custom_field'), 10, 4);
308
- add_filter('woocommerce_form_field_multiselect', array($this, 'custom_field'), 10, 4);
309
- add_filter('woocommerce_form_field_select', array($this, 'custom_field'), 10, 4);
310
- add_filter('woocommerce_form_field_file', array($this, 'custom_field'), 10, 4);
311
- add_filter('woocommerce_form_field_heading', array($this, 'heading_field'), 10, 4);
312
- add_filter('woocommerce_form_field_colorpicker', array($this, 'colorpicker_field'), 10, 4);
313
- add_filter('woocommerce_form_field_country', array($this, 'country_field'), 10, 4);
314
- add_filter('woocommerce_form_field_state', array($this, 'state_field'), 10, 4);
315
- add_filter('woocommerce_form_field_hidden', array($this, 'hidden_field'), 10, 4);
316
- }
317
  }
318
 
319
  WOOCCM_Fields_Filter::instance();
1
  <?php
2
 
3
+ class WOOCCM_Fields_Filter {
4
+
5
+
6
+ protected static $_instance;
7
+ public $count = 0;
8
+
9
+ public function __construct() {
10
+ $this->init();
11
+ }
12
+
13
+ public static function instance() {
14
+ if ( is_null( self::$_instance ) ) {
15
+ self::$_instance = new self();
16
+ }
17
+ return self::$_instance;
18
+ }
19
+
20
+ // Custom fields
21
+ // ---------------------------------------------------------------------------
22
+ public function custom_field( $field = '', $key = '', $args = array(), $value = null ) {
23
+ $field = '';
24
+
25
+ if ( $args['required'] ) {
26
+ // $args['class'][] = 'validate-required';
27
+ $required = '&nbsp;<abbr class="required" title="' . esc_attr__( 'required', 'woocommerce-checkout-manager' ) . '">*</abbr>';
28
+ } else {
29
+ $required = '&nbsp;<span class="optional">(' . esc_html__( 'optional', 'woocommerce-checkout-manager' ) . ')</span>';
30
+ }
31
+
32
+ if ( is_string( $args['label_class'] ) ) {
33
+ $args['label_class'] = array( $args['label_class'] );
34
+ }
35
+
36
+ // if (is_null($value)) {
37
+ if ( ! $value ) {
38
+ $value = $args['default'];
39
+ }
40
 
41
+ // Custom attribute handling.
42
+ $custom_attributes = array();
43
+ $args['custom_attributes'] = array_filter( (array) $args['custom_attributes'], 'strlen' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
+ if ( $args['maxlength'] ) {
46
+ $args['custom_attributes']['maxlength'] = absint( $args['maxlength'] );
47
+ }
 
48
 
49
+ if ( ! empty( $args['autocomplete'] ) ) {
50
+ $args['custom_attributes']['autocomplete'] = $args['autocomplete'];
51
+ }
52
 
53
+ if ( true === $args['autofocus'] ) {
54
+ $args['custom_attributes']['autofocus'] = 'autofocus';
55
+ }
56
 
57
+ if ( $args['description'] ) {
58
+ $args['custom_attributes']['aria-describedby'] = $args['id'] . '-description';
59
+ }
60
 
61
+ if ( ! empty( $args['custom_attributes'] ) && is_array( $args['custom_attributes'] ) ) {
62
+ foreach ( $args['custom_attributes'] as $attribute => $attribute_value ) {
63
+ $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
64
+ }
65
+ }
66
 
67
+ if ( ! empty( $args['validate'] ) ) {
68
+ foreach ( $args['validate'] as $validate ) {
69
+ $args['class'][] = 'validate-' . $validate;
70
+ }
71
+ }
72
 
73
+ // $field = '';
74
+ $label_id = $args['id'];
75
+ $sort = $args['priority'] ? $args['priority'] : '';
76
+ $field_container = '<p class="form-row %1$s" id="%2$s" data-priority="' . esc_attr( $sort ) . '">%3$s</p>';
77
+ switch ( $args['type'] ) {
78
 
79
+ case 'radio':
80
+ $field = '';
 
 
 
81
 
82
+ if ( ! empty( $args['options'] ) ) {
 
 
 
 
83
 
84
+ $field .= ' <span class="woocommerce-radio-wrapper" ' . implode( ' ', $custom_attributes ) . '>';
 
85
 
86
+ foreach ( $args['options'] as $option_key => $option_text ) {
87
+ $option_key = is_numeric( $option_key ) ? $option_text : $option_key;
88
+ $field .= '<input type="radio" class="input-checkbox" value="' . esc_attr( $option_key ) . '" name="' . esc_attr( $key ) . '" id="' . esc_attr( $key ) . '_' . esc_attr( $option_key ) . '"' . checked( $value, $option_text, false ) . ' />';
89
+ $field .= '<label for="' . esc_attr( $key ) . '_' . esc_attr( $option_key ) . '" class="checkbox ' . implode( ' ', $args['label_class'] ) . '">' . $option_text . '</label><br>';
90
+ }
91
 
92
+ $field .= ' </span>';
93
+ }
94
 
95
+ break;
 
 
 
 
96
 
97
+ case 'select':
98
+ $field = '';
99
 
100
+ if ( ! empty( $args['options'] ) ) {
101
+ $field .= '<select name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" class="select ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" ' . implode( ' ', $custom_attributes ) . ' data-placeholder="' . esc_attr( $args['placeholder'] ) . '">';
102
+ if ( ! empty( $args['placeholder'] ) ) {
103
+ $field .= '<option value="" disabled="disabled" selected="selected">' . esc_attr( $args['placeholder'] ) . '</option>';
104
+ }
105
+ foreach ( $args['options'] as $option_key => $option_text ) {
106
+ $option_key = is_numeric( $option_key ) ? $option_text : $option_key;
107
+ $field .= '<option value="' . esc_attr( $option_key ) . '" ' . selected( $value, $option_text, false ) . '>' . esc_attr( $option_text ) . '</option>';
108
+ }
109
+ $field .= '</select>';
110
+ }
111
 
112
+ break;
113
 
114
+ case 'multiselect':
115
+ $field = '';
116
 
117
+ $value = is_array( $value ) ? $value : array_map( 'trim', (array) explode( ',', $value ) );
 
 
 
 
 
 
 
 
 
 
118
 
119
+ if ( ! empty( $args['options'] ) ) {
120
+ $field .= '<select name="' . esc_attr( $key ) . '[]" id="' . esc_attr( $key ) . '" class="select ' . esc_attr( implode( ' ', $args['input_class'] ) ) . '" multiple="multiple" ' . implode( ' ', $custom_attributes ) . '>';
121
+ foreach ( $args['options'] as $option_key => $option_text ) {
122
+ $option_key = is_numeric( $option_key ) ? $option_text : $option_key;
123
+ $field .= '<option value="' . esc_attr( $option_key ) . '" ' . selected( in_array( $option_text, $value ), 1, false ) . '>' . esc_attr( $option_text ) . '</option>';
124
+ }
125
+ $field .= ' </select>';
126
+ }
127
 
128
+ break;
129
 
130
+ case 'multicheckbox':
131
+ $field = '';
132
 
133
+ $value = is_array( $value ) ? $value : array_map( 'trim', (array) explode( ',', $value ) );
134
 
135
+ if ( ! empty( $args['options'] ) ) {
 
 
 
 
 
 
 
136
 
137
+ $field .= ' <span class="woocommerce-multicheckbox-wrapper" ' . implode( ' ', $custom_attributes ) . '>';
138
 
139
+ foreach ( $args['options'] as $option_key => $option_text ) {
140
+ $option_key = is_numeric( $option_key ) ? $option_text : $option_key;
141
+ $field .= '<label><input type="checkbox" name="' . esc_attr( $key ) . '[]" value="' . esc_attr( $option_key ) . '"' . checked( in_array( $option_text, $value ), 1, false ) . ' /> ' . esc_attr( $option_text ) . '</label>';
142
+ }
143
 
144
+ $field .= '</span>';
145
+ }
146
 
147
+ break;
148
 
149
+ case 'file':
150
+ $field = '';
151
 
152
+ $field .= '<button style="width:100%" class="wooccm-file-button button alt" type="button" class="button alt" id="' . esc_attr( $key ) . '_button">' . esc_html( $args['placeholder'] ) . '</button>';
153
+ // $field .= '<input class="wooccm-file-field" type="text" name="' . esc_attr($key) . '" id="' . esc_attr($key) . '" value="test" />';
154
+ $field .= '<input class="wooccm-file-field" type="hidden" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" value="" ' . implode( ' ', $custom_attributes ) . ' />';
155
+ $field .= '<input style="display:none;" class="fileinput-button" type="file" name="' . esc_attr( $key ) . '_file" id="' . esc_attr( $key ) . '_file" multiple="multiple" />';
156
+ $field .= '<span style="display:none;" class="wooccm-file-list"></span>';
157
 
158
+ break;
159
+ }
 
 
160
 
161
+ if ( ! empty( $field ) ) {
162
+ $field_html = '';
163
 
164
+ if ( $args['label'] && 'checkbox' !== $args['type'] ) {
165
+ $field_html .= '<label for="' . esc_attr( $label_id ) . '" class="' . esc_attr( implode( ' ', $args['label_class'] ) ) . '">' . $args['label'] . $required . '</label>';
166
+ }
167
 
168
+ $field_html .= '<span class="woocommerce-input-wrapper">' . $field;
169
 
170
+ if ( $args['description'] ) {
171
+ $field_html .= '<span class="description" id="' . esc_attr( $args['id'] ) . '-description" aria-hidden="true">' . wp_kses_post( $args['description'] ) . '</span>';
172
+ }
173
 
174
+ $field_html .= '</span>';
 
 
 
 
175
 
176
+ $container_class = esc_attr( implode( ' ', $args['class'] ) );
177
+ $container_id = esc_attr( $args['id'] ) . '_field';
178
+ $field = sprintf( $field_container, $container_class, $container_id, $field_html );
179
+ }
180
 
181
+ return $field;
182
+ }
183
 
184
+ // Heading
185
+ // ---------------------------------------------------------------------------
186
+ public function heading_field( $field = '', $key = '', $args = array(), $value = null ) {
187
+ // Custom attribute handling.
188
+ $custom_attributes = array();
189
 
190
+ if ( ! empty( $args['custom_attributes'] ) && is_array( $args['custom_attributes'] ) ) {
191
+ foreach ( $args['custom_attributes'] as $attribute => $attribute_value ) {
192
+ $custom_attributes[] = esc_attr( $attribute ) . '="' . esc_attr( $attribute_value ) . '"';
193
+ }
194
+ }
195
 
196
+ $sort = $args['priority'] ? $args['priority'] : '';
 
 
197
 
198
+ $field_html = '<h3 ' . implode( ' ', $custom_attributes ) . '>' . esc_html( $args['label'] ) . '</h3>';
199
 
200
+ $container_class = esc_attr( implode( ' ', $args['class'] ) );
201
+ $container_id = esc_attr( $args['id'] ) . '_field';
202
+ $field_container = '<div class="form-row %1$s" id="%2$s" data-priority="' . esc_attr( $sort ) . '">%3$s</div>';
 
203
 
204
+ return sprintf( $field_container, $container_class, $container_id, $field_html );
205
+ }
206
 
207
+ // Colorpicker
208
+ // ---------------------------------------------------------------------------
209
+ public function colorpicker_field( $field = '', $key = '', $args = array(), $value = null ) {
210
+ $args['type'] = 'text';
211
+ $args['maxlength'] = 7;
212
 
213
+ ob_start();
 
214
 
215
+ woocommerce_form_field( $key, $args, $value );
 
 
 
 
216
 
217
+ $field = ob_get_clean();
218
 
219
+ $field = str_replace( '</p>', ' <span class="wooccmcolorpicker_container" class="spec_shootd"></span></p>', $field );
220
 
221
+ return $field;
222
+ }
 
223
 
224
+ // Country
225
+ // ---------------------------------------------------------------------------
226
+ public function country_field( $field = '', $key = '', $args = array(), $value = null ) {
227
+ static $instance = 0;
228
 
229
+ if ( $instance ) {
230
+ return $field;
231
+ }
 
232
 
233
+ $instance++;
 
234
 
235
+ ob_start();
236
 
237
+ if ( ! empty( $args['default'] ) ) {
238
+ $value = $args['default'];
239
+ }
240
 
241
+ woocommerce_form_field( $key, $args, $value );
242
 
243
+ $field = ob_get_clean();
244
 
245
+ return $field;
246
+ }
247
 
248
+ // State
249
+ // ---------------------------------------------------------------------------
250
+ public function state_field( $field = '', $key = '', $args = array(), $value = null ) {
251
+ static $instance = 0;
252
 
253
+ if ( $instance ) {
254
+ return $field;
255
+ }
256
 
257
+ $instance++;
 
 
258
 
259
+ ob_start();
260
 
261
+ if ( ! empty( $args['default'] ) ) {
262
+ $value = $args['default'];
263
+ }
264
 
265
+ woocommerce_form_field( $key, $args, $value );
 
 
266
 
267
+ $field = ob_get_clean();
268
 
269
+ return $field;
270
+ }
271
 
272
+ public function hidden_field( $field = '', $key = '', $args = array(), $value = null ) {
273
+ static $instance = 0;
274
 
275
+ if ( $instance ) {
276
+ return $field;
277
+ }
 
278
 
279
+ $instance++;
280
 
281
+ $field .= '<input type="hidden" name="' . esc_attr( $key ) . '" id="' . esc_attr( $args['id'] ) . '" value="' . esc_html( $value ) . '" ' . implode( ' ', $args['custom_attributes'] ) . ' readonly="readonly" />';
 
 
282
 
283
+ return $field;
284
+ }
285
 
286
+ public function init() {
287
+ add_filter( 'woocommerce_form_field_radio', array( $this, 'custom_field' ), 10, 4 );
288
+ add_filter( 'woocommerce_form_field_multicheckbox', array( $this, 'custom_field' ), 10, 4 );
289
+ add_filter( 'woocommerce_form_field_multiselect', array( $this, 'custom_field' ), 10, 4 );
290
+ add_filter( 'woocommerce_form_field_select', array( $this, 'custom_field' ), 10, 4 );
291
+ add_filter( 'woocommerce_form_field_file', array( $this, 'custom_field' ), 10, 4 );
292
+ add_filter( 'woocommerce_form_field_heading', array( $this, 'heading_field' ), 10, 4 );
293
+ add_filter( 'woocommerce_form_field_colorpicker', array( $this, 'colorpicker_field' ), 10, 4 );
294
+ add_filter( 'woocommerce_form_field_country', array( $this, 'country_field' ), 10, 4 );
295
+ add_filter( 'woocommerce_form_field_state', array( $this, 'state_field' ), 10, 4 );
296
+ add_filter( 'woocommerce_form_field_hidden', array( $this, 'hidden_field' ), 10, 4 );
297
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
298
  }
299
 
300
  WOOCCM_Fields_Filter::instance();
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: checkout field editor, woocommerce checkout field editor, checkout manager
5
  Requires at least: 4.9
6
  Tested up to: 6.0.1
7
  Requires PHP: 5.6
8
- Stable tag: 6.2.2
9
  WC requires at least: 3.1.0
10
  WC tested up to: 6.8
11
  License: GPLv3
@@ -149,6 +149,9 @@ Your Order data can be reviewed in each order within the default WooCommerce Ord
149
 
150
  == Changelog ==
151
 
 
 
 
152
  = 6.2.2
153
  * Fix. PHP erros
154
 
5
  Requires at least: 4.9
6
  Tested up to: 6.0.1
7
  Requires PHP: 5.6
8
+ Stable tag: 6.2.3
9
  WC requires at least: 3.1.0
10
  WC tested up to: 6.8
11
  License: GPLv3
149
 
150
  == Changelog ==
151
 
152
+ = 6.2.3
153
+ * Fix. PHP erros
154
+
155
  = 6.2.2
156
  * Fix. PHP erros
157
 
woocommerce-checkout-manager.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Checkout Fields Manager for WooCommerce
5
  * Plugin URI: https://quadlayers.com/portfolio/woocommerce-checkout-manager/
6
  * Description: Manage and customize WooCommerce Checkout fields (Add, Edit, Delete or re-order fields).
7
- * Version: 6.2.2
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
@@ -16,51 +16,37 @@ if ( ! defined( 'ABSPATH' ) ) {
16
  die( '-1' );
17
  }
18
 
19
- if ( ! defined( 'WOOCCM_PLUGIN_NAME' ) ) {
20
- define( 'WOOCCM_PLUGIN_NAME', 'Checkout Fields Manager for WooCommerce' );
21
- }
22
- if ( ! defined( 'WOOCCM_PLUGIN_VERSION' ) ) {
23
- define( 'WOOCCM_PLUGIN_VERSION', '6.2.2' );
24
- }
25
- if ( ! defined( 'WOOCCM_PLUGIN_FILE' ) ) {
26
- define( 'WOOCCM_PLUGIN_FILE', __FILE__ );
27
- }
28
- if ( ! defined( 'WOOCCM_PLUGIN_DIR' ) ) {
29
- define( 'WOOCCM_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
30
- }
31
- if ( ! defined( 'WOOCCM_PREFIX' ) ) {
32
- define( 'WOOCCM_PREFIX', 'wooccm' );
33
- }
34
- if ( ! defined( 'WOOCCM_WORDPRESS_URL' ) ) {
35
- define( 'WOOCCM_WORDPRESS_URL', 'https://wordpress.org/plugins/woocommerce-checkout-manager/' );
36
- }
37
- if ( ! defined( 'WOOCCM_REVIEW_URL' ) ) {
38
- define( 'WOOCCM_REVIEW_URL', 'https://wordpress.org/support/plugin/woocommerce-checkout-manager/reviews/?filter=5#new-post' );
39
- }
40
- if ( ! defined( 'WOOCCM_DOCUMENTATION_URL' ) ) {
41
- define( 'WOOCCM_DOCUMENTATION_URL', 'https://quadlayers.com/documentation/woocommerce-checkout-manager/?utm_source=wooccm_admin' );
42
- }
43
- if ( ! defined( 'WOOCCM_DEMO_URL' ) ) {
44
- define( 'WOOCCM_DEMO_URL', 'https://quadlayers.com/portfolio/woocommerce-checkout-manager/?utm_source=wooccm_admin' );
45
- }
46
- if ( ! defined( 'WOOCCM_PURCHASE_URL' ) ) {
47
- define( 'WOOCCM_PURCHASE_URL', WOOCCM_DEMO_URL );
48
- }
49
- if ( ! defined( 'WOOCCM_SUPPORT_URL' ) ) {
50
- define( 'WOOCCM_SUPPORT_URL', 'https://quadlayers.com/account/support/?utm_source=wooccm_admin' );
51
- }
52
- if ( ! defined( 'WOOCCM_GROUP_URL' ) ) {
53
- define( 'WOOCCM_GROUP_URL', 'https://www.facebook.com/groups/quadlayers' );
54
- }
55
- if ( ! defined( 'WOOCCM_DEVELOPER' ) ) {
56
- define( 'WOOCCM_DEVELOPER', false );
57
- }
58
 
59
  if ( ! class_exists( 'WOOCCM', false ) ) {
60
  include_once WOOCCM_PLUGIN_DIR . 'includes/class-wooccm.php';
61
  }
62
 
63
  require_once WOOCCM_PLUGIN_DIR . 'includes/quadlayers/widget.php';
 
 
64
 
65
  function WOOCCM() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
66
  return WOOCCM::instance();
4
  * Plugin Name: Checkout Fields Manager for WooCommerce
5
  * Plugin URI: https://quadlayers.com/portfolio/woocommerce-checkout-manager/
6
  * Description: Manage and customize WooCommerce Checkout fields (Add, Edit, Delete or re-order fields).
7
+ * Version: 6.2.3
8
  * Author: QuadLayers
9
  * Author URI: https://quadlayers.com
10
  * License: GPLv3
16
  die( '-1' );
17
  }
18
 
19
+ define( 'WOOCCM_PLUGIN_NAME', 'Checkout Fields Manager for WooCommerce' );
20
+ define( 'WOOCCM_PLUGIN_VERSION', '6.2.3' );
21
+ define( 'WOOCCM_PLUGIN_FILE', __FILE__ );
22
+ define( 'WOOCCM_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
23
+ define( 'WOOCCM_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
24
+ define( 'WOOCCM_PREFIX', 'wooccm' );
25
+ define( 'WOOCCM_WORDPRESS_URL', 'https://wordpress.org/plugins/woocommerce-checkout-manager/' );
26
+ define( 'WOOCCM_REVIEW_URL', 'https://wordpress.org/support/plugin/woocommerce-checkout-manager/reviews/?filter=5#new-post' );
27
+ define( 'WOOCCM_DOCUMENTATION_URL', 'https://quadlayers.com/documentation/woocommerce-checkout-manager/?utm_source=wooccm_admin' );
28
+ define( 'WOOCCM_DEMO_URL', 'https://quadlayers.com/portfolio/woocommerce-checkout-manager/?utm_source=wooccm_admin' );
29
+ define( 'WOOCCM_PURCHASE_URL', WOOCCM_DEMO_URL );
30
+ define( 'WOOCCM_SUPPORT_URL', 'https://quadlayers.com/account/support/?utm_source=wooccm_admin' );
31
+ define( 'WOOCCM_GROUP_URL', 'https://www.facebook.com/groups/quadlayers' );
32
+ define( 'WOOCCM_DEVELOPER', false );
33
+
34
+ define( 'WOOCCM_PREMIUM_SELL_SLUG', 'woocommerce-checkout-manager-pro' );
35
+ define( 'WOOCCM_PREMIUM_SELL_NAME', 'WooCommerce Checkout Manager' );
36
+ define( 'WOOCCM_PREMIUM_SELL_URL', 'https://quadlayers.com/portfolio/woocommerce-checkout-manager/?utm_source=wooccm_admin' );
37
+
38
+ define( 'WOOCCM_CROSS_INSTALL_SLUG', 'woocommerce-direct-checkout' );
39
+ define( 'WOOCCM_CROSS_INSTALL_NAME', 'Direct Checkout' );
40
+ define( 'WOOCCM_CROSS_INSTALL_DESCRIPTION', esc_html__( 'Direct Checkout for WooCommerce allows you to reduce the steps in the checkout process by skipping the shopping cart page. This can encourage buyers to shop more and quickly. You will increase your sales reducing cart abandonment.', 'woocommerce-checkout-manager' ) );
41
+ define( 'WOOCCM_CROSS_INSTALL_URL', 'https://quadlayers.com/portfolio/woocommerce-checkout-manager/?utm_source=wooccm_admin' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
42
 
43
  if ( ! class_exists( 'WOOCCM', false ) ) {
44
  include_once WOOCCM_PLUGIN_DIR . 'includes/class-wooccm.php';
45
  }
46
 
47
  require_once WOOCCM_PLUGIN_DIR . 'includes/quadlayers/widget.php';
48
+ require_once WOOCCM_PLUGIN_DIR . 'includes/quadlayers/notices.php';
49
+ require_once WOOCCM_PLUGIN_DIR . 'includes/quadlayers/links.php';
50
 
51
  function WOOCCM() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
52
  return WOOCCM::instance();