WooCommerce Checkout Field Editor (Manager) Pro - Version 1.7.2

Version Description

  • Fixed the issue with WooCommerce PayPal Payments plugin.
  • Added WooCommerce 6.8 compatibility.
Download this release

Release Info

Developer ThemeHigh
Plugin Icon 128x128 WooCommerce Checkout Field Editor (Manager) Pro
Version 1.7.2
Comparing to
See all releases

Code changes from version 1.7.1 to 1.7.2

admin/assets/css/themehigh.svg ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg width="21" height="17" viewBox="0 0 21 17" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_99_56)">
3
+ <path d="M13.8746 0H-0.015358V4.13727H13.8746V0Z" fill="#EF4C85"/>
4
+ <path d="M21 6.42345H4.49945V10.5686H21V6.42345Z" fill="#AC3092"/>
5
+ <path d="M21 12.8548H16.109V17H20.9846L21 12.8548Z" fill="#AC3092"/>
6
+ <path d="M13.8746 12.8548H8.9989V17H13.8746V12.8548Z" fill="#AC3092"/>
7
+ <path d="M21 0H16.109V4.13727H20.9846L21 0Z" fill="#AC3092"/>
8
+ </g>
9
+ <defs>
10
+ <clipPath id="clip0_99_56">
11
+ <rect width="21" height="17" fill="white"/>
12
+ </clipPath>
13
+ </defs>
14
+ </svg>
admin/class-thwcfd-admin.php CHANGED
@@ -67,6 +67,10 @@ class THWCFD_Admin {
67
  array_unshift($links, $settings_link);
68
  $pro_link = '<a style="color:green; font-weight:bold" target="_blank" href="https://www.themehigh.com/product/woocommerce-checkout-field-editor-pro/?utm_source=free&utm_medium=plugin_action_link&utm_campaign=wcfe_upgrade_link">'. __('Get Pro', 'woo-checkout-field-editor-pro') .'</a>';
69
  array_push($links,$pro_link);
 
 
 
 
70
  return $links;
71
  }
72
 
@@ -138,6 +142,9 @@ class THWCFD_Admin {
138
  return;
139
  }
140
 
 
 
 
141
  $current_screen = get_current_screen();
142
  // if($current_screen->id !== 'woocommerce_page_checkout_form_designer'){
143
  // return;
67
  array_unshift($links, $settings_link);
68
  $pro_link = '<a style="color:green; font-weight:bold" target="_blank" href="https://www.themehigh.com/product/woocommerce-checkout-field-editor-pro/?utm_source=free&utm_medium=plugin_action_link&utm_campaign=wcfe_upgrade_link">'. __('Get Pro', 'woo-checkout-field-editor-pro') .'</a>';
69
  array_push($links,$pro_link);
70
+
71
+ if (array_key_exists('deactivate', $links)) {
72
+ $links['deactivate'] = str_replace('<a', '<a class="thwcfd-deactivate-link"', $links['deactivate']);
73
+ }
74
  return $links;
75
  }
76
 
142
  return;
143
  }
144
 
145
+ if ( !current_user_can( 'manage_options' ) ) {
146
+ return;
147
+ }
148
  $current_screen = get_current_screen();
149
  // if($current_screen->id !== 'woocommerce_page_checkout_form_designer'){
150
  // return;
checkout-form-designer.php CHANGED
@@ -3,13 +3,13 @@
3
  * Plugin Name: Checkout Field Editor for WooCommerce
4
  * Description: Customize WooCommerce checkout fields(Add, Edit, Delete and re-arrange fields).
5
  * Author: ThemeHigh
6
- * Version: 1.7.1
7
  * Author URI: https://www.themehigh.com
8
  * Plugin URI: https://www.themehigh.com
9
  * Text Domain: woo-checkout-field-editor-pro
10
  * Domain Path: /languages
11
  * WC requires at least: 3.0.0
12
- * WC tested up to: 6.7
13
  */
14
 
15
  if(!defined( 'ABSPATH' )) exit;
@@ -25,7 +25,7 @@ if (!function_exists('is_woocommerce_active')){
25
  }
26
 
27
  if(is_woocommerce_active()) {
28
- define('THWCFD_VERSION', '1.7.1');
29
  !defined('THWCFD_BASE_NAME') && define('THWCFD_BASE_NAME', plugin_basename( __FILE__ ));
30
  !defined('THWCFD_PATH') && define('THWCFD_PATH', plugin_dir_path( __FILE__ ));
31
  !defined('THWCFD_URL') && define('THWCFD_URL', plugins_url( '/', __FILE__ ));
3
  * Plugin Name: Checkout Field Editor for WooCommerce
4
  * Description: Customize WooCommerce checkout fields(Add, Edit, Delete and re-arrange fields).
5
  * Author: ThemeHigh
6
+ * Version: 1.7.2
7
  * Author URI: https://www.themehigh.com
8
  * Plugin URI: https://www.themehigh.com
9
  * Text Domain: woo-checkout-field-editor-pro
10
  * Domain Path: /languages
11
  * WC requires at least: 3.0.0
12
+ * WC tested up to: 6.8
13
  */
14
 
15
  if(!defined( 'ABSPATH' )) exit;
25
  }
26
 
27
  if(is_woocommerce_active()) {
28
+ define('THWCFD_VERSION', '1.7.2');
29
  !defined('THWCFD_BASE_NAME') && define('THWCFD_BASE_NAME', plugin_basename( __FILE__ ));
30
  !defined('THWCFD_PATH') && define('THWCFD_PATH', plugin_dir_path( __FILE__ ));
31
  !defined('THWCFD_URL') && define('THWCFD_URL', plugins_url( '/', __FILE__ ));
includes/class-thwcfd.php CHANGED
@@ -71,6 +71,8 @@ class THWCFD {
71
  add_filter('plugin_action_links_'.THWCFD_BASE_NAME, array($plugin_admin, 'plugin_action_links'));
72
  add_action( 'admin_init', array( $plugin_admin, 'wcfd_notice_actions' ), 20 );
73
  add_action( 'admin_notices', array($plugin_admin, 'output_review_request_link'));
 
 
74
  //add_filter('plugin_row_meta', array($plugin_admin, 'plugin_row_meta'), 10, 2);
75
 
76
  $themehigh_plugins = new THWCFD_Admin_Settings_Themehigh_Plugins();
@@ -131,6 +133,466 @@ class THWCFD {
131
  update_user_meta( get_current_user_id(), 'thwcfd_review_skipped_time', $now );
132
  }
133
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
134
  }
135
 
136
  endif;
71
  add_filter('plugin_action_links_'.THWCFD_BASE_NAME, array($plugin_admin, 'plugin_action_links'));
72
  add_action( 'admin_init', array( $plugin_admin, 'wcfd_notice_actions' ), 20 );
73
  add_action( 'admin_notices', array($plugin_admin, 'output_review_request_link'));
74
+ add_action('admin_footer-plugins.php', array($this, 'thwcfd_deactivation_form'));
75
+ add_action('wp_ajax_thwcfd_deactivation_reason', array($this, 'thwcfd_deactivation_reason'));
76
  //add_filter('plugin_row_meta', array($plugin_admin, 'plugin_row_meta'), 10, 2);
77
 
78
  $themehigh_plugins = new THWCFD_Admin_Settings_Themehigh_Plugins();
133
  update_user_meta( get_current_user_id(), 'thwcfd_review_skipped_time', $now );
134
  }
135
 
136
+ public function thwcfd_deactivation_form(){
137
+ $is_snooze_time = get_user_meta( get_current_user_id(), 'thwcfd_deactivation_snooze', true );
138
+ $now = time();
139
+
140
+ if($is_snooze_time && ($now < $is_snooze_time)){
141
+ return;
142
+ }
143
+
144
+ $deactivation_reasons = $this->get_deactivation_reasons();
145
+ ?>
146
+ <div id="thwcfd_deactivation_form" class="thpladmin-modal-mask">
147
+ <div class="thpladmin-modal">
148
+ <div class="modal-container">
149
+ <!-- <span class="modal-close" onclick="thwcfdfCloseModal(this)">×</span> -->
150
+ <div class="modal-content">
151
+ <div class="modal-body">
152
+ <div class="model-header">
153
+ <img class="th-logo" src="<?php echo esc_url(THWCFD_URL .'admin/assets/css/themehigh.svg'); ?>" alt="themehigh-logo">
154
+ <span><?php echo __('Quick Feedback', 'woo-checkout-field-editor-pro'); ?></span>
155
+ </div>
156
+
157
+ <!-- <div class="get-support-version-b">
158
+ <p>We are sad to see you go. We would be happy to fix things for you. Please raise a ticket to get help</p>
159
+ <a class="thwcfd-link thwcfd-right-link thwcfd-active" target="_blank" href="https://help.themehigh.com/hc/en-us/requests/new?utm_source=wcfe_free&utm_medium=feedback_form&utm_campaign=get_support"><?php echo __('Get Support', 'woo-checkout-field-editor-pro'); ?></a>
160
+ </div> -->
161
+
162
+ <main class="form-container main-full">
163
+ <p class="thwcfd-title-text"><?php echo __('If you have a moment, please let us know why you want to deactivate this plugin', 'woo-checkout-field-editor-pro'); ?></p>
164
+ <ul class="deactivation-reason" data-nonce="<?php echo wp_create_nonce('thwcfd_deactivate_nonce'); ?>">
165
+ <?php
166
+ if($deactivation_reasons){
167
+ foreach($deactivation_reasons as $key => $reason){
168
+ $reason_type = isset($reason['reason_type']) ? $reason['reason_type'] : '';
169
+ $reason_placeholder = isset($reason['reason_placeholder']) ? $reason['reason_placeholder'] : '';
170
+ ?>
171
+ <li data-type="<?php echo esc_attr($reason_type); ?>" data-placeholder="<?php echo esc_attr($reason_placeholder); ?> ">
172
+ <label>
173
+ <input type="radio" name="selected-reason" value="<?php echo esc_attr($key); ?>">
174
+ <span><?php echo esc_html($reason['radio_label']); ?></span>
175
+ </label>
176
+ </li>
177
+ <?php
178
+ }
179
+ }
180
+ ?>
181
+ </ul>
182
+ <p class="thwcfd-privacy-cnt"><?php echo __('This form is only for getting your valuable feedback. We do not collect your personal data. To know more read our ', 'woo-checkout-field-editor-pro'); ?> <a class="thwcfd-privacy-link" target="_blank" href="<?php echo esc_url('https://www.themehigh.com/privacy-policy/');?>"><?php echo __('Privacy Policy', 'woo-checkout-field-editor-pro'); ?></a></p>
183
+ </main>
184
+ <footer class="modal-footer">
185
+ <div class="thwcfd-left">
186
+ <a class="thwcfd-link thwcfd-left-link thwcfd-deactivate" href="#"><?php echo __('Skip & Deactivate', 'woo-checkout-field-editor-pro'); ?></a>
187
+ </div>
188
+ <div class="thwcfd-right">
189
+
190
+ <a class="thwcfd-link thwcfd-right-link thwcfd-active" target="_blank" href="https://help.themehigh.com/hc/en-us/requests/new?utm_source=wcfe_free&utm_medium=feedback_form&utm_campaign=get_support"><?php echo __('Get Support', 'woo-checkout-field-editor-pro'); ?></a>
191
+
192
+ <a class="thwcfd-link thwcfd-right-link thwcfd-active thwcfd-submit-deactivate" href="#"><?php echo __('Submit and Deactivate', 'woo-checkout-field-editor-pro'); ?></a>
193
+ <a class="thwcfd-link thwcfd-right-link thwcfd-close" href="#"><?php echo __('Cancel', 'woo-checkout-field-editor-pro'); ?></a>
194
+ </div>
195
+ </footer>
196
+ </div>
197
+ </div>
198
+ </div>
199
+ </div>
200
+ </div>
201
+ <style type="text/css">
202
+ .th-logo{
203
+ margin-right: 10px;
204
+ }
205
+ .thpladmin-modal-mask{
206
+ position: fixed;
207
+ background-color: rgba(17,30,60,0.6);
208
+ top: 0;
209
+ left: 0;
210
+ width: 100%;
211
+ height: 100%;
212
+ z-index: 9999;
213
+ overflow: scroll;
214
+ transition: opacity 250ms ease-in-out;
215
+ }
216
+ .thpladmin-modal-mask{
217
+ display: none;
218
+ }
219
+ .thpladmin-modal .modal-container{
220
+ position: absolute;
221
+ background: #fff;
222
+ border-radius: 2px;
223
+ overflow: hidden;
224
+ left: 50%;
225
+ top: 50%;
226
+ transform: translate(-50%,-50%);
227
+ width: 50%;
228
+ max-width: 960px;
229
+ /*min-height: 560px;*/
230
+ /*height: 80vh;*/
231
+ /*max-height: 640px;*/
232
+ animation: appear-down 250ms ease-in-out;
233
+ border-radius: 15px;
234
+ }
235
+ .model-header {
236
+ padding: 21px;
237
+ }
238
+ .thpladmin-modal .model-header span {
239
+ font-size: 18px;
240
+ font-weight: bold;
241
+ }
242
+ .thpladmin-modal .model-header {
243
+ padding: 21px;
244
+ background: #ECECEC;
245
+ }
246
+ .thpladmin-modal .form-container {
247
+ margin-left: 23px;
248
+ clear: both;
249
+ }
250
+ .thpladmin-modal .deactivation-reason input {
251
+ margin-right: 13px;
252
+ }
253
+ .thpladmin-modal .thwcfd-privacy-cnt {
254
+ color: #919191;
255
+ font-size: 12px;
256
+ margin-bottom: 31px;
257
+ margin-top: 18px;
258
+ max-width: 75%;
259
+ }
260
+ .thpladmin-modal .deactivation-reason li {
261
+ margin-bottom: 17px;
262
+ }
263
+ .thpladmin-modal .modal-footer {
264
+ padding: 20px;
265
+ border-top: 1px solid #E7E7E7;
266
+ float: left;
267
+ width: 100%;
268
+ box-sizing: border-box;
269
+ }
270
+ .thwcfd-left {
271
+ float: left;
272
+ }
273
+ .thwcfd-right {
274
+ float: right;
275
+ }
276
+ .thwcfd-link {
277
+ line-height: 31px;
278
+ font-size: 12px;
279
+ }
280
+ .thwcfd-left-link {
281
+ font-style: italic;
282
+ }
283
+ .thwcfd-right-link {
284
+ padding: 0px 20px;
285
+ border: 1px solid;
286
+ display: inline-block;
287
+ text-decoration: none;
288
+ border-radius: 5px;
289
+ }
290
+ .thwcfd-right-link.thwcfd-active {
291
+ background: #0773AC;
292
+ color: #fff;
293
+ }
294
+ .thwcfd-title-text {
295
+ color: #2F2F2F;
296
+ font-weight: 500;
297
+ font-size: 15px;
298
+ }
299
+ .reason-input {
300
+ margin-left: 31px;
301
+ margin-top: 11px;
302
+ width: 70%;
303
+ }
304
+ .reason-input input {
305
+ width: 100%;
306
+ height: 40px;
307
+ }
308
+ .reason-input textarea {
309
+ width: 100%;
310
+ min-height: 80px;
311
+ }
312
+ input.th-snooze-checkbox {
313
+ width: 15px;
314
+ height: 15px;
315
+ }
316
+ input.th-snooze-checkbox:checked:before {
317
+ width: 1.2rem;
318
+ height: 1.2rem;
319
+ }
320
+ .th-snooze-select {
321
+ margin-left: 20px;
322
+ width: 172px;
323
+ }
324
+
325
+ /* Version B */
326
+ .get-support-version-b {
327
+ width: 100%;
328
+ padding-left: 23px;
329
+ clear: both;
330
+ float: left;
331
+ box-sizing: border-box;
332
+ background: #0673ab;
333
+ color: #fff;
334
+ margin-bottom: 20px;
335
+ }
336
+ .get-support-version-b p {
337
+ font-size: 12px;
338
+ line-height: 17px;
339
+ width: 70%;
340
+ display: inline-block;
341
+ margin: 0px;
342
+ padding: 15px 0px;
343
+ }
344
+ .get-support-version-b .thwcfd-right-link {
345
+ background-image: url(<?php echo esc_url(THWCFD_URL .'admin/assets/css/get_support_icon.svg'); ?>);
346
+ background-repeat: no-repeat;
347
+ background-position: 11px 10px;
348
+ padding-left: 31px;
349
+ color: #0773AC;
350
+ background-color: #fff;
351
+ float: right;
352
+ margin-top: 17px;
353
+ margin-right: 20px;
354
+ }
355
+ .thwcfd-privacy-link {
356
+ font-style: italic;
357
+ }
358
+ .wcfe-review-link {
359
+ margin-top: 7px;
360
+ margin-left: 31px;
361
+ font-size: 16px;
362
+ }
363
+ span.wcfe-rating-link {
364
+ color: #ffb900;
365
+ }
366
+ .thwcfd-review-and-deactivate {
367
+ text-decoration: none;
368
+ }
369
+ </style>
370
+
371
+ <script type="text/javascript">
372
+ (function($){
373
+ var popup = $("#thwcfd_deactivation_form");
374
+ var deactivation_link = '';
375
+ $('.thwcfd-deactivate-link').on('click', function(e){
376
+ e.preventDefault();
377
+ deactivation_link = $(this).attr('href');
378
+ popup.css("display", "block");
379
+ popup.find('a.thwcfd-deactivate').attr('href', deactivation_link);
380
+ });
381
+
382
+ popup.on('click', 'input[type="radio"]', function () {
383
+ var parent = $(this).parents('li:first');
384
+ popup.find('.reason-input').remove();
385
+
386
+ var type = parent.data('type');
387
+ var placeholder = parent.data('placeholder');
388
+
389
+ var reason_input = '';
390
+ if('text' == type){
391
+ reason_input += '<div class="reason-input">';
392
+ reason_input += '<input type="text" placeholder="'+ placeholder +'">';
393
+ reason_input += '</div>';
394
+ }else if('textarea' == type){
395
+ reason_input += '<div class="reason-input">';
396
+ reason_input += '<textarea row="5" placeholder="'+ placeholder +'">';
397
+ reason_input += '</textarea>';
398
+ reason_input += '</div>';
399
+ }else if('checkbox' == type){
400
+ reason_input += '<div class="reason-input ">';
401
+ reason_input += '<input type="checkbox" id="th-snooze" name="th-snooze" class="th-snooze-checkbox">';
402
+ reason_input += '<label for="th-snooze">Snooze this panel while troubleshooting</label>';
403
+ reason_input += '<select name="th-snooze-time" class="th-snooze-select" disabled>';
404
+ reason_input += '<option value="<?php echo HOUR_IN_SECONDS ?>">1 Hour</option>';
405
+ reason_input += '<option value="<?php echo 12*HOUR_IN_SECONDS ?>">12 Hour</option>';
406
+ reason_input += '<option value="<?php echo DAY_IN_SECONDS ?>">24 Hour</option>';
407
+ reason_input += '<option value="<?php echo WEEK_IN_SECONDS ?>">1 Week</option>';
408
+ reason_input += '<option value="<?php echo MONTH_IN_SECONDS ?>">1 Month</option>';
409
+ reason_input += '</select>';
410
+ reason_input += '</div>';
411
+ }else if('reviewlink' == type){
412
+ reason_input += '<div class="reason-input wcfe-review-link">';
413
+ /*
414
+ reason_input += '<?php _e('Deactivate and ', 'woo-checkout-field-editor-pro');?>'
415
+ reason_input += '<a href="#" target="_blank" class="thwcfd-review-and-deactivate">';
416
+ reason_input += '<?php _e('leave a review', 'woo-checkout-field-editor-pro'); ?>';
417
+ reason_input += '<span class="wcfe-rating-link"> &#9733;&#9733;&#9733;&#9733;&#9733; </span>';
418
+ reason_input += '</a>';
419
+ */
420
+ reason_input += '<input type="hidden" value="<?php _e('Upgraded', 'woo-checkout-field-editor-pro');?>">';
421
+ reason_input += '</div>';
422
+ }
423
+
424
+ if(reason_input !== ''){
425
+ parent.append($(reason_input));
426
+ }
427
+ });
428
+
429
+ popup.on('click', '.thwcfd-close', function () {
430
+ popup.css("display", "none");
431
+ });
432
+
433
+ /*
434
+ popup.on('click', '.thwcfd-review-and-deactivate', function () {
435
+ e.preventDefault();
436
+ window.open("https://wordpress.org/support/plugin/woo-checkout-field-editor-pro/reviews/?rate=5#new-post");
437
+ console.log(deactivation_link);
438
+ window.location.href = deactivation_link;
439
+ });
440
+ */
441
+
442
+ popup.on('click', '.thwcfd-submit-deactivate', function (e) {
443
+ e.preventDefault();
444
+ var button = $(this);
445
+ if (button.hasClass('disabled')) {
446
+ return;
447
+ }
448
+ var radio = $('.deactivation-reason input[type="radio"]:checked');
449
+ var parent_li = radio.parents('li:first');
450
+ var parent_ul = radio.parents('ul:first');
451
+ var input = parent_li.find('textarea, input[type="text"], input[type="hidden"]');
452
+ var wcfe_deacive_nonce = parent_ul.data('nonce');
453
+
454
+ $.ajax({
455
+ url: ajaxurl,
456
+ type: 'POST',
457
+ data: {
458
+ action: 'thwcfd_deactivation_reason',
459
+ reason: (0 === radio.length) ? 'none' : radio.val(),
460
+ comments: (0 !== input.length) ? input.val().trim() : '',
461
+ security: wcfe_deacive_nonce,
462
+ },
463
+ beforeSend: function () {
464
+ button.addClass('disabled');
465
+ button.text('Processing...');
466
+ },
467
+ complete: function () {
468
+ window.location.href = deactivation_link;
469
+ }
470
+ });
471
+ });
472
+
473
+ popup.on('click', '#th-snooze', function () {
474
+ if($(this).is(':checked')){
475
+ popup.find('.th-snooze-select').prop("disabled", false);
476
+ }else{
477
+ popup.find('.th-snooze-select').prop("disabled", true);
478
+ }
479
+ });
480
+
481
+ }(jQuery))
482
+ </script>
483
+
484
+ <?php
485
+ }
486
+ private function get_deactivation_reasons(){
487
+ return array(
488
+ 'upgraded_to_wcfe_pro' => array(
489
+ 'radio_val' => 'upgraded_to_wcfe_pro',
490
+ 'radio_label' => __('Upgraded to premium.', 'woo-extra-product-options'),
491
+ 'reason_type' => 'reviewlink',
492
+ 'reason_placeholder' => '',
493
+ ),
494
+
495
+ 'feature_missing'=> array(
496
+ 'radio_val' => 'feature_missing',
497
+ 'radio_label' => __('A specific feature is missing', 'woo-checkout-field-editor-pro'),
498
+ 'reason_type' => 'text',
499
+ 'reason_placeholder' => __('Type in the feature', 'woo-checkout-field-editor-pro'),
500
+ ),
501
+
502
+ 'error_or_not_working'=> array(
503
+ 'radio_val' => 'error_or_not_working',
504
+ 'radio_label' => __('Found an error in the plugin/ Plugin was not working', 'woo-checkout-field-editor-pro'),
505
+ 'reason_type' => 'text',
506
+ 'reason_placeholder' => __('Specify the issue', 'woo-checkout-field-editor-pro'),
507
+ ),
508
+
509
+ 'hard_to_use' => array(
510
+ 'radio_val' => 'hard_to_use',
511
+ 'radio_label' => __('It was hard to use', 'woo-checkout-field-editor-pro'),
512
+ 'reason_type' => 'text',
513
+ 'reason_placeholder' => __('How can we improve your experience?', 'woo-checkout-field-editor-pro'),
514
+ ),
515
+
516
+ 'found_better_plugin' => array(
517
+ 'radio_val' => 'found_better_plugin',
518
+ 'radio_label' => __('I found a better Plugin', 'woo-checkout-field-editor-pro'),
519
+ 'reason_type' => 'text',
520
+ 'reason_placeholder' => __('Could you please mention the plugin?', 'woo-checkout-field-editor-pro'),
521
+ ),
522
+
523
+ // 'not_working_as_expected'=> array(
524
+ // 'radio_val' => 'not_working_as_expected',
525
+ // 'radio_label' => __('The plugin didn’t work as expected', 'woo-checkout-field-editor-pro'),
526
+ // 'reason_type' => 'text',
527
+ // 'reason_placeholder' => __('Specify the issue', 'woo-checkout-field-editor-pro'),
528
+ // ),
529
+
530
+ 'temporary' => array(
531
+ 'radio_val' => 'temporary',
532
+ 'radio_label' => __('It’s a temporary deactivation - I’m troubleshooting an issue', 'woo-checkout-field-editor-pro'),
533
+ 'reason_type' => 'checkbox',
534
+ 'reason_placeholder' => __('Could you please mention the plugin?', 'woo-checkout-field-editor-pro'),
535
+ ),
536
+
537
+ 'other' => array(
538
+ 'radio_val' => 'other',
539
+ 'radio_label' => __('Not mentioned here', 'woo-checkout-field-editor-pro'),
540
+ 'reason_type' => 'textarea',
541
+ 'reason_placeholder' => __('Kindly tell us your reason, so that we can improve', 'woo-checkout-field-editor-pro'),
542
+ ),
543
+ );
544
+ }
545
+
546
+ public function thwcfd_deactivation_reason(){
547
+ global $wpdb;
548
+
549
+ check_ajax_referer('thwcfd_deactivate_nonce', 'security');
550
+
551
+ if(!isset($_POST['reason'])){
552
+ return;
553
+ }
554
+
555
+ if($_POST['reason'] === 'temporary'){
556
+
557
+ $snooze_period = isset($_POST['th-snooze-time']) && $_POST['th-snooze-time'] ? $_POST['th-snooze-time'] : MINUTE_IN_SECONDS ;
558
+ $time_now = time();
559
+ $snooze_time = $time_now + $snooze_period;
560
+
561
+ update_user_meta(get_current_user_id(), 'thwcfd_deactivation_snooze', $snooze_time);
562
+
563
+ return;
564
+ }
565
+
566
+ $data = array(
567
+ 'plugin' => 'wcfe',
568
+ 'reason' => sanitize_text_field($_POST['reason']),
569
+ 'comments' => isset($_POST['comments']) ? sanitize_textarea_field(wp_unslash($_POST['comments'])) : '',
570
+ 'date' => gmdate("M d, Y h:i:s A"),
571
+ 'software' => $_SERVER['SERVER_SOFTWARE'],
572
+ 'php_version' => phpversion(),
573
+ 'mysql_version' => $wpdb->db_version(),
574
+ 'wp_version' => get_bloginfo('version'),
575
+ 'wc_version' => (!defined('WC_VERSION')) ? '' : WC_VERSION,
576
+ 'locale' => get_locale(),
577
+ 'multisite' => is_multisite() ? 'Yes' : 'No',
578
+ 'plugin_version'=> THWCFD_VERSION
579
+ );
580
+
581
+ $response = wp_remote_post('https://feedback.themehigh.in/api/add_feedbacks', array(
582
+ 'method' => 'POST',
583
+ 'timeout' => 45,
584
+ 'redirection' => 5,
585
+ 'httpversion' => '1.0',
586
+ 'blocking' => false,
587
+ 'headers' => array( 'Content-Type' => 'application/json' ),
588
+ 'body' => json_encode($data),
589
+ 'cookies' => array()
590
+ )
591
+ );
592
+
593
+ wp_send_json_success();
594
+ }
595
+
596
  }
597
 
598
  endif;
public/class-thwcfd-public-checkout.php CHANGED
@@ -562,6 +562,11 @@ class THWCFD_Public_Checkout {
562
 
563
 
564
  public function woo_form_field($field, $key, $args, $value = null){
 
 
 
 
 
565
  $field = '';
566
 
567
  if ( $args['required'] ) {
562
 
563
 
564
  public function woo_form_field($field, $key, $args, $value = null){
565
+
566
+ if(!is_checkout()){
567
+ return $field;
568
+ }
569
+
570
  $field = '';
571
 
572
  if ( $args['required'] ) {
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
7
  Requires PHP: 5.6
8
- Stable tag: 1.7.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -18,8 +18,7 @@ WooCommerce Checkout Field Editor (Checkout Manager) Plugin lets you add 20 diff
18
 
19
  It enables you to edit the default checkout fields of your WooCommerce platform, add new custom fields in the three sections (namely Billing, Shipping and Additional), edit, hide, or delete the default fields, change labels, rearrange checkout fields, validate the checkout fields, add custom css classes etc.
20
 
21
- [Try the Demo](https://flydemos.com/wcfe/?utm_source=wordpress&utm_medium=referral&utm_content=tracking) | [Documents](https://help.themehigh.com/hc/en-us/categories/900000285646-Checkout-Field-Editor) | [Pro Version](https://www.themehigh.com/product/woocommerce-checkout-field-editor-pro/)
22
-
23
  --------------------------------------------
24
  https://www.youtube.com/watch?v=_iKMe5lGIIM
25
  --------------------------------------------
@@ -79,6 +78,19 @@ Using this plugin, you can reset to the original state with the default fields o
79
  = ☞ Translate Ready to Other Language =
80
  The Checkout Field Editor plugin lets you translate to other languages as it is compatible with WPML, Polylang & Loco Translate translation plugins. To translate dynamic strings, use Polylang or WPML plugin.
81
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  == 💎💎 Upgrade to Premium Version Now! ==
83
  The premium version of WooCommerce Checkout Field Editor (Checkout Manager) Plugin lets you add 24 different types of custom checkout fields and sections to your Checkout page, and make the best out of your Checkout form.
84
 
@@ -185,9 +197,9 @@ Pro version of the plugin supports multiple third-party plugins, so as to benefi
185
  *Multi-language Support*: Supporting multiple languages has become an important aspect of the present world, since there are still a lot of people who are not comfortable with the English language. Since our plugin is compatible with the WordPress Multilingual Plugin (WPML), we support multiple languages too.
186
 
187
  --------------------------------------------
188
- *For the complete list of features, Please visit [WooCommerce Checkout Field Editor (Checkout Manager)](https://www.themehigh.com/product/woocommerce-checkout-field-editor-pro/?utm_source=wordpress&utm_medium=referral&utm_content=tracking) plugin's official page.*
189
 
190
- Check how it works: 🔗 [Live Demo](https://flydemos.com/wcfe/?utm_source=wordpress&utm_medium=referral&utm_content=tracking)
191
  --------------------------------------------
192
 
193
  == Why ThemeHigh ==
@@ -209,10 +221,10 @@ Frequent updates are made to improve the plugin with a talented group of develop
209
 
210
  For more info on ThemeHigh and WooCommerce Checkout Field Editor plugin in specific, check out the following:
211
 
212
- * The [Checkout Field Editor (Checkout Manager) for WooCommerce](https://www.themehigh.com/product/woocommerce-checkout-field-editor-pro/?utm_source=wordpress&utm_medium=referral&utm_content=tracking) premium plugin homepage.
213
- * The [Knowledgebase](https://help.themehigh.com/hc/en-us/categories/900000285646-Checkout-Field-Editor).
214
- * Other [WordPress Plugins](https://www.themehigh.com/plugins/?utm_source=wordpress&utm_medium=referral&utm_content=tracking) by the ThemeHigh team.
215
- * Follow ThemeHigh on [Facebook](https://www.facebook.com/ThemeHigh-319611541768603/?utm_source=wordpress&utm_medium=referral&utm_content=tracking), [LinkedIn](https://www.linkedin.com/company/themehigh/?utm_source=wordpress&utm_medium=referral&utm_content=tracking), [Twitter](https://twitter.com/themehigh/?utm_source=wordpress&utm_medium=referral&utm_content=tracking) & [YouTube](https://www.youtube.com/channel/UC-_uMXaC_21j1Y2_nGjTyvg/?utm_source=wordpress&utm_medium=referral&utm_content=tracking).
216
 
217
  == Installation ==
218
  = Minimum Requirements =
@@ -272,6 +284,10 @@ Yes. There is a button 'reset to default fields' to go back to the WooCommerce d
272
  9. Locale override settings
273
 
274
  == Changelog ==
 
 
 
 
275
  = 1.7.1 =
276
  * Minor bug fixes.
277
 
5
  Requires at least: 4.9
6
  Tested up to: 6.0
7
  Requires PHP: 5.6
8
+ Stable tag: 1.7.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
18
 
19
  It enables you to edit the default checkout fields of your WooCommerce platform, add new custom fields in the three sections (namely Billing, Shipping and Additional), edit, hide, or delete the default fields, change labels, rearrange checkout fields, validate the checkout fields, add custom css classes etc.
20
 
21
+ [Try the Demo](https://flydemos.com/wcfe/?utm_source=wcfe_free&utm_medium=readme&utm_campaign=try_demo) | [Documents](https://www.themehigh.com/docs/docs-category/checkout-field-editor-for-woocommerce/?utm_source=wcfe_free&utm_medium=readme&utm_campaign=help_docs) | [Pro Version](https://www.themehigh.com/product/woocommerce-checkout-field-editor-pro/?utm_source=wcfe_free&utm_medium=readme&utm_campaign=wcfe_upgrade_link) | [Join Community](http://www.facebook.com/groups/themehigh/)
 
22
  --------------------------------------------
23
  https://www.youtube.com/watch?v=_iKMe5lGIIM
24
  --------------------------------------------
78
  = ☞ Translate Ready to Other Language =
79
  The Checkout Field Editor plugin lets you translate to other languages as it is compatible with WPML, Polylang & Loco Translate translation plugins. To translate dynamic strings, use Polylang or WPML plugin.
80
 
81
+
82
+ == Other Popular plugins from Themehigh ==
83
+
84
+ **[Extra Product Options For WooCommerce](https://wordpress.org/plugins/woo-extra-product-options/)**: This Custom Product addons plugin lets you quickly add additional fields (19 custom field types) and sections to your WooCommerce Product page.
85
+
86
+ **[Multi-Step Checkout Options For WooCommerce](https://wordpress.org/plugins/woo-multistep-checkout/)**: The Multistep checkout plugin helps you to split the regular WooCommerce checkout process with simpler steps by creating a better experience for your customers.
87
+
88
+ **[Variation Swatches For WooCommerce](https://wordpress.org/plugins/product-variation-swatches-for-woocommerce/)**: Start converting the default WooCommerce product attribute drop-downs into stylish swatches (color, image, radio, and label) using this free variation swatches plugin.
89
+
90
+ **[Email Customizer For WooCommerce](https://wordpress.org/plugins/email-customizer-for-woocommerce/)**: Email Customizer, an intuitive template builder that lets you customise your WooCommerce transactional emails using different elements like text, image, divider, etc.
91
+
92
+ Join [Themehigh Community](https://www.facebook.com/groups/themehigh/) to get help from similar people.
93
+
94
  == 💎💎 Upgrade to Premium Version Now! ==
95
  The premium version of WooCommerce Checkout Field Editor (Checkout Manager) Plugin lets you add 24 different types of custom checkout fields and sections to your Checkout page, and make the best out of your Checkout form.
96
 
197
  *Multi-language Support*: Supporting multiple languages has become an important aspect of the present world, since there are still a lot of people who are not comfortable with the English language. Since our plugin is compatible with the WordPress Multilingual Plugin (WPML), we support multiple languages too.
198
 
199
  --------------------------------------------
200
+ *For the complete list of features, Please visit [WooCommerce Checkout Field Editor (Checkout Manager)](https://www.themehigh.com/product/woocommerce-checkout-field-editor-pro/?utm_source=wcfe_free&utm_medium=readme&utm_campaign=wcfe_upgrade_link) plugin's official page.*
201
 
202
+ Check how it works: 🔗 [Live Demo](https://flydemos.com/wcfe/?utm_source=wcfe_free&utm_medium=readme&utm_campaign=try_demo)
203
  --------------------------------------------
204
 
205
  == Why ThemeHigh ==
221
 
222
  For more info on ThemeHigh and WooCommerce Checkout Field Editor plugin in specific, check out the following:
223
 
224
+ * The [Checkout Field Editor (Checkout Manager) for WooCommerce](https://www.themehigh.com/product/woocommerce-checkout-field-editor-pro/?utm_source=wcfe_free&utm_medium=readme&utm_campaign=wcfe_upgrade_link) premium plugin homepage.
225
+ * The [Knowledge base](https://www.themehigh.com/docs/docs-category/checkout-field-editor-for-woocommerce/?utm_source=wcfe_free&utm_medium=readme&utm_campaign=help_docs).
226
+ * Other [WordPress Plugins](https://www.themehigh.com/plugins/?utm_source=wcfe_free&utm_medium=readme&utm_campaign=themehigh_plugins) by the ThemeHigh team.
227
+ * Follow ThemeHigh on [Facebook](https://www.facebook.com/ThemeHigh-319611541768603/), [LinkedIn](https://www.linkedin.com/company/themehigh/), [Twitter](https://twitter.com/themehigh/) & [YouTube](https://www.youtube.com/channel/UC-_uMXaC_21j1Y2_nGjTyvg/).
228
 
229
  == Installation ==
230
  = Minimum Requirements =
284
  9. Locale override settings
285
 
286
  == Changelog ==
287
+ = 1.7.2 =
288
+ * Fixed the issue with [WooCommerce PayPal Payments](https://wordpress.org/plugins/woocommerce-paypal-payments/) plugin.
289
+ * Added WooCommerce 6.8 compatibility.
290
+
291
  = 1.7.1 =
292
  * Minor bug fixes.
293