Import Export WordPress Users and WooCommerce Customers - Version 1.1.9

Version Description

  • Tested OK with WC 3.5.1
  • Feedback on uninstall
Download this release

Release Info

Developer webtoffee
Plugin Icon 128x128 Import Export WordPress Users and WooCommerce Customers
Version 1.1.9
Comparing to
See all releases

Code changes from version 1.1.8 to 1.1.9

customer-import-export.php CHANGED
@@ -6,8 +6,8 @@
6
  Description: Export and Import User/Customers details From and To your WordPress/WooCommerce.
7
  Author: WebToffee
8
  Author URI: https://www.webtoffee.com/product/wordpress-users-woocommerce-customers-import-export/
9
- Version: 1.1.8
10
- WC tested up to: 3.5.0
11
  Text Domain: wf_customer_import_export
12
  License: GPLv3
13
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -36,6 +36,12 @@ if( !defined('WF_CUSTOMER_IMP_EXP_ID') )
36
  define("WF_CUSTOMER_IMP_EXP_ID", "wf_customer_imp_exp");
37
  }
38
 
 
 
 
 
 
 
39
  if( !defined('HF_WORDPRESS_CUSTOMER_IM_EX') )
40
  {
41
  define("HF_WORDPRESS_CUSTOMER_IM_EX", "hf_wordpress_customer_im_ex");
@@ -75,6 +81,8 @@ if (!class_exists('WF_Customer_Import_Export_CSV')) :
75
 
76
  include_once( 'includes/class-wf-customerimpexpcsv-admin-screen.php' );
77
  include_once( 'includes/importer/class-wf-customerimpexpcsv-importer.php' );
 
 
78
 
79
  if (defined('DOING_AJAX')) {
80
  include_once( 'includes/class-wf-customerimpexpcsv-ajax-handler.php' );
@@ -82,12 +90,18 @@ if (!class_exists('WF_Customer_Import_Export_CSV')) :
82
  }
83
 
84
  public function wf_plugin_action_links($links) {
 
85
  $plugin_links = array(
86
  '<a href="' . admin_url('admin.php?page=hf_wordpress_customer_im_ex') . '">' . __('Import Export Users', 'wf_customer_import_export') . '</a>',
87
- '<a href="https://www.webtoffee.com/product/wordpress-users-woocommerce-customers-import-export/" target="_blank" style="color:#3db634;">' . __('Premium Upgrade', 'eh-stripe-gateway') . '</a>',
88
  '<a target="_blank" href="https://www.webtoffee.com/support/">' . __('Support', 'wf_customer_import_export') . '</a>',
89
  '<a target="_blank" href="https://wordpress.org/support/plugin/users-customers-import-export-for-wp-woocommerce/reviews/">' . __('Review', 'wf_customer_import_export') . '</a>',
90
  );
 
 
 
 
 
91
  return array_merge($plugin_links, $links);
92
  }
93
 
6
  Description: Export and Import User/Customers details From and To your WordPress/WooCommerce.
7
  Author: WebToffee
8
  Author URI: https://www.webtoffee.com/product/wordpress-users-woocommerce-customers-import-export/
9
+ Version: 1.1.9
10
+ WC tested up to: 3.5.1
11
  Text Domain: wf_customer_import_export
12
  License: GPLv3
13
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
36
  define("WF_CUSTOMER_IMP_EXP_ID", "wf_customer_imp_exp");
37
  }
38
 
39
+ if( !defined('WF_CUSTOMER_IMP_EXP_VERSION') )
40
+ {
41
+ define("WF_CUSTOMER_IMP_EXP_VERSION", "1.1.9");
42
+ }
43
+
44
+
45
  if( !defined('HF_WORDPRESS_CUSTOMER_IM_EX') )
46
  {
47
  define("HF_WORDPRESS_CUSTOMER_IM_EX", "hf_wordpress_customer_im_ex");
81
 
82
  include_once( 'includes/class-wf-customerimpexpcsv-admin-screen.php' );
83
  include_once( 'includes/importer/class-wf-customerimpexpcsv-importer.php' );
84
+
85
+ include_once ('includes/class-wt-userimport-uninstall-feedback.php');
86
 
87
  if (defined('DOING_AJAX')) {
88
  include_once( 'includes/class-wf-customerimpexpcsv-ajax-handler.php' );
90
  }
91
 
92
  public function wf_plugin_action_links($links) {
93
+
94
  $plugin_links = array(
95
  '<a href="' . admin_url('admin.php?page=hf_wordpress_customer_im_ex') . '">' . __('Import Export Users', 'wf_customer_import_export') . '</a>',
96
+ '<a target="_blank" href="https://www.webtoffee.com/product/wordpress-users-woocommerce-customers-import-export/" style="color:#3db634;">' . __('Premium Upgrade', 'wf_customer_import_export') . '</a>',
97
  '<a target="_blank" href="https://www.webtoffee.com/support/">' . __('Support', 'wf_customer_import_export') . '</a>',
98
  '<a target="_blank" href="https://wordpress.org/support/plugin/users-customers-import-export-for-wp-woocommerce/reviews/">' . __('Review', 'wf_customer_import_export') . '</a>',
99
  );
100
+
101
+ if (array_key_exists('deactivate', $links)) {
102
+
103
+ $links['deactivate'] = str_replace('<a', '<a class="userimport-deactivate-link"', $links['deactivate']);
104
+ }
105
  return array_merge($plugin_links, $links);
106
  }
107
 
includes/class-wt-userimport-uninstall-feedback.php ADDED
@@ -0,0 +1,260 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if (!class_exists('WT_UserImport_Uninstall_Feedback')) :
3
+
4
+ /**
5
+ * Class for catch Feedback on uninstall
6
+ */
7
+ class WT_UserImport_Uninstall_Feedback {
8
+
9
+ public function __construct() {
10
+ add_action('admin_footer', array($this, 'deactivate_scripts'));
11
+ add_action('wp_ajax_userimport_submit_uninstall_reason', array($this, "send_uninstall_reason"));
12
+ }
13
+
14
+ private function get_uninstall_reasons() {
15
+
16
+ $reasons = array(
17
+ array(
18
+ 'id' => 'used-it',
19
+ 'text' => __('Used it successfully. Don\'t need anymore.', 'wf_customer_import_export'),
20
+ 'type' => 'reviewhtml',
21
+ 'placeholder' => __('Have used it successfully and aint in need of it anymore', 'wf_customer_import_export')
22
+ ),
23
+ array(
24
+ 'id' => 'could-not-understand',
25
+ 'text' => __('I couldn\'t understand how to make it work', 'wf_customer_import_export'),
26
+ 'type' => 'textarea',
27
+ 'placeholder' => __('Would you like us to assist you?', 'wf_customer_import_export')
28
+ ),
29
+ array(
30
+ 'id' => 'found-better-plugin',
31
+ 'text' => __('I found a better plugin', 'wf_customer_import_export'),
32
+ 'type' => 'text',
33
+ 'placeholder' => __('Which plugin?', 'wf_customer_import_export')
34
+ ),
35
+ array(
36
+ 'id' => 'not-have-that-feature',
37
+ 'text' => __('The plugin is great, but I need specific feature that you don\'t support', 'wf_customer_import_export'),
38
+ 'type' => 'textarea',
39
+ 'placeholder' => __('Could you tell us more about that feature?', 'wf_customer_import_export')
40
+ ),
41
+ array(
42
+ 'id' => 'is-not-working',
43
+ 'text' => __('The plugin is not working', 'wf_customer_import_export'),
44
+ 'type' => 'textarea',
45
+ 'placeholder' => __('Could you tell us a bit more whats not working?', 'wf_customer_import_export')
46
+ ),
47
+ array(
48
+ 'id' => 'looking-for-other',
49
+ 'text' => __('It\'s not what I was looking for', 'wf_customer_import_export'),
50
+ 'type' => 'textarea',
51
+ 'placeholder' => 'Could you tell us a bit more?'
52
+ ),
53
+ array(
54
+ 'id' => 'did-not-work-as-expected',
55
+ 'text' => __('The plugin didn\'t work as expected', 'wf_customer_import_export'),
56
+ 'type' => 'textarea',
57
+ 'placeholder' => __('What did you expect?', 'wf_customer_import_export')
58
+ ),
59
+ array(
60
+ 'id' => 'other',
61
+ 'text' => __('Other', 'wf_customer_import_export'),
62
+ 'type' => 'textarea',
63
+ 'placeholder' => __('Could you tell us a bit more?', 'wf_customer_import_export')
64
+ ),
65
+ );
66
+
67
+ return $reasons;
68
+ }
69
+
70
+ public function deactivate_scripts() {
71
+
72
+ global $pagenow;
73
+ if ('plugins.php' != $pagenow) {
74
+ return;
75
+ }
76
+ $reasons = $this->get_uninstall_reasons();
77
+ ?>
78
+ <div class="userimport-modal" id="userimport-userimport-modal">
79
+ <div class="userimport-modal-wrap">
80
+ <div class="userimport-modal-header">
81
+ <h3><?php _e('If you have a moment, please let us know why you are deactivating:', 'wf_customer_import_export'); ?></h3>
82
+ </div>
83
+ <div class="userimport-modal-body">
84
+ <ul class="reasons">
85
+ <?php foreach ($reasons as $reason) { ?>
86
+ <li data-type="<?php echo esc_attr($reason['type']); ?>" data-placeholder="<?php echo esc_attr($reason['placeholder']); ?>">
87
+ <label><input type="radio" name="selected-reason" value="<?php echo $reason['id']; ?>"> <?php echo $reason['text']; ?></label>
88
+ </li>
89
+ <?php } ?>
90
+ </ul>
91
+ </div>
92
+ <div class="userimport-modal-footer">
93
+ <a href="#" class="dont-bother-me"><?php _e('I rather wouldn\'t say', 'wf_customer_import_export'); ?></a>
94
+ <button class="button-primary userimport-model-submit"><?php _e('Submit & Deactivate', 'wf_customer_import_export'); ?></button>
95
+ <button class="button-secondary userimport-model-cancel"><?php _e('Cancel', 'wf_customer_import_export'); ?></button>
96
+ </div>
97
+ </div>
98
+ </div>
99
+
100
+ <style type="text/css">
101
+ .userimport-modal {
102
+ position: fixed;
103
+ z-index: 99999;
104
+ top: 0;
105
+ right: 0;
106
+ bottom: 0;
107
+ left: 0;
108
+ background: rgba(0,0,0,0.5);
109
+ display: none;
110
+ }
111
+ .userimport-modal.modal-active {display: block;}
112
+ .userimport-modal-wrap {
113
+ width: 50%;
114
+ position: relative;
115
+ margin: 10% auto;
116
+ background: #fff;
117
+ }
118
+ .userimport-modal-header {
119
+ border-bottom: 1px solid #eee;
120
+ padding: 8px 20px;
121
+ }
122
+ .userimport-modal-header h3 {
123
+ line-height: 150%;
124
+ margin: 0;
125
+ }
126
+ .userimport-modal-body {padding: 5px 20px 20px 20px;}
127
+ .userimport-modal-body .input-text,.userimport-modal-body textarea {width:75%;}
128
+ .userimport-modal-body .reason-input {
129
+ margin-top: 5px;
130
+ margin-left: 20px;
131
+ }
132
+ .userimport-modal-footer {
133
+ border-top: 1px solid #eee;
134
+ padding: 12px 20px;
135
+ text-align: right;
136
+ }
137
+ .reviewlink{
138
+ padding:10px 0px 0px 35px !important;
139
+ font-size: 15px;
140
+ }
141
+ .review-and-deactivate{
142
+ padding:5px;
143
+ }
144
+ </style>
145
+ <script type="text/javascript">
146
+ (function ($) {
147
+ $(function () {
148
+ var modal = $('#userimport-userimport-modal');
149
+ var deactivateLink = '';
150
+ $('#the-list').on('click', 'a.userimport-deactivate-link', function (e) {
151
+ e.preventDefault();
152
+ modal.addClass('modal-active');
153
+ deactivateLink = $(this).attr('href');
154
+ modal.find('a.dont-bother-me').attr('href', deactivateLink).css('float', 'left');
155
+ });
156
+
157
+ $('#userimport-userimport-modal').on('click', 'a.review-and-deactivate', function (e) {
158
+ e.preventDefault();
159
+ window.open("https://wordpress.org/support/plugin/users-customers-import-export-for-wp-woocommerce/reviews/?filter=5#new-post");
160
+ window.location.href = deactivateLink;
161
+ });
162
+
163
+ modal.on('click', 'button.userimport-model-cancel', function (e) {
164
+ e.preventDefault();
165
+ modal.removeClass('modal-active');
166
+ });
167
+ modal.on('click', 'input[type="radio"]', function () {
168
+ var parent = $(this).parents('li:first');
169
+ modal.find('.reason-input').remove();
170
+ var inputType = parent.data('type'),
171
+ inputPlaceholder = parent.data('placeholder');
172
+
173
+ if ('reviewhtml' === inputType) {
174
+ var reasonInputHtml = '<div class="reviewlink"><a href="#" target="_blank" class="review-and-deactivate"><?php _e('Deactivate and leave a review', 'wf_customer_import_export'); ?> <span class="wt-userimport-rating-link"> &#9733;&#9733;&#9733;&#9733;&#9733; </span></a></div>';
175
+ } else {
176
+ var reasonInputHtml = '<div class="reason-input">' + (('text' === inputType) ? '<input type="text" class="input-text" size="40" />' : '<textarea rows="5" cols="45"></textarea>') + '</div>';
177
+ }
178
+ if (inputType !== '') {
179
+ parent.append($(reasonInputHtml));
180
+ parent.find('input, textarea').attr('placeholder', inputPlaceholder).focus();
181
+ }
182
+ });
183
+
184
+ modal.on('click', 'button.userimport-model-submit', function (e) {
185
+ e.preventDefault();
186
+ var button = $(this);
187
+ if (button.hasClass('disabled')) {
188
+ return;
189
+ }
190
+ var $radio = $('input[type="radio"]:checked', modal);
191
+ var $selected_reason = $radio.parents('li:first'),
192
+ $input = $selected_reason.find('textarea, input[type="text"]');
193
+
194
+ $.ajax({
195
+ url: ajaxurl,
196
+ type: 'POST',
197
+ data: {
198
+ action: 'userimport_submit_uninstall_reason',
199
+ reason_id: (0 === $radio.length) ? 'none' : $radio.val(),
200
+ reason_info: (0 !== $input.length) ? $input.val().trim() : ''
201
+ },
202
+ beforeSend: function () {
203
+ button.addClass('disabled');
204
+ button.text('Processing...');
205
+ },
206
+ complete: function () {
207
+ window.location.href = deactivateLink;
208
+ }
209
+ });
210
+ });
211
+ });
212
+ }(jQuery));
213
+ </script>
214
+ <?php
215
+ }
216
+
217
+ public function send_uninstall_reason() {
218
+
219
+ global $wpdb;
220
+
221
+ if (!isset($_POST['reason_id'])) {
222
+ wp_send_json_error();
223
+ }
224
+
225
+ $data = array(
226
+ 'reason_id' => sanitize_text_field($_POST['reason_id']),
227
+ 'plugin' => "userimport",
228
+ 'auth' => 'userimport_uninstall_1234#',
229
+ 'date' => gmdate("M d, Y h:i:s A"),
230
+ 'url' => '',
231
+ 'user_email' => '',
232
+ 'reason_info' => isset($_REQUEST['reason_info']) ? trim(stripslashes($_REQUEST['reason_info'])) : '',
233
+ 'software' => $_SERVER['SERVER_SOFTWARE'],
234
+ 'php_version' => phpversion(),
235
+ 'mysql_version' => $wpdb->db_version(),
236
+ 'wp_version' => get_bloginfo('version'),
237
+ 'wc_version' => (!defined('WC_VERSION')) ? '' : WC_VERSION,
238
+ 'locale' => get_locale(),
239
+ 'multisite' => is_multisite() ? 'Yes' : 'No',
240
+ 'userimport_version' => WF_CUSTOMER_IMP_EXP_VERSION
241
+ );
242
+ // Write an action/hook here in webtoffe to recieve the data
243
+ $resp = wp_remote_post('http://feedback.webtoffee.com/wp-json/userimport/v1/uninstall', array(
244
+ 'method' => 'POST',
245
+ 'timeout' => 45,
246
+ 'redirection' => 5,
247
+ 'httpversion' => '1.0',
248
+ 'blocking' => false,
249
+ 'body' => $data,
250
+ 'cookies' => array()
251
+ )
252
+ );
253
+
254
+ wp_send_json_success();
255
+ }
256
+
257
+ }
258
+ new WT_UserImport_Uninstall_Feedback();
259
+
260
+ endif;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.webtoffee.com/plugins/
4
  Tags: Export Users to CSV, Import Users from CSV, woocommerce export customers, user export, export import users, woocommerce import customers, woocommerce export customer email
5
  Requires at least: 3.0.1
6
  Tested up to: 4.9.8
7
- Stable tag: 1.1.8
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -19,7 +19,7 @@ Import users and export users made fast and simple! Import Export WordPress User
19
 
20
  &#128312; Users Export - Export Users to CSV file.</li>
21
  &#128312; Users import - Import Users from CSV format to WordPress/WooCommerce Store.
22
- &#128312; Tested OK with WooCommerce 3.5.0
23
 
24
  Highlights: WordPress Users Export, WordPress Users CSV Import Suite, Export WordPress Users to CSV. Pro Version supports export and import of all additional user meta like WooCommerce deatils.
25
 
@@ -148,6 +148,9 @@ No. You may want to use https://wordpress.org/plugins/order-import-export-for-wo
148
 
149
  == Changelog ==
150
 
 
 
 
151
  = 1.1.8 =
152
  * Tested OK with WC 3.5.0
153
  = 1.1.7 =
@@ -194,5 +197,6 @@ No. You may want to use https://wordpress.org/plugins/order-import-export-for-wo
194
 
195
  == Upgrade Notice ==
196
 
197
- = 1.1.8 =
198
- * Tested OK with WC 3.5.0
 
4
  Tags: Export Users to CSV, Import Users from CSV, woocommerce export customers, user export, export import users, woocommerce import customers, woocommerce export customer email
5
  Requires at least: 3.0.1
6
  Tested up to: 4.9.8
7
+ Stable tag: 1.1.9
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
19
 
20
  &#128312; Users Export - Export Users to CSV file.</li>
21
  &#128312; Users import - Import Users from CSV format to WordPress/WooCommerce Store.
22
+ &#128312; Tested OK with WooCommerce 3.5.1
23
 
24
  Highlights: WordPress Users Export, WordPress Users CSV Import Suite, Export WordPress Users to CSV. Pro Version supports export and import of all additional user meta like WooCommerce deatils.
25
 
148
 
149
  == Changelog ==
150
 
151
+ = 1.1.9 =
152
+ * Tested OK with WC 3.5.1
153
+ * Feedback on uninstall
154
  = 1.1.8 =
155
  * Tested OK with WC 3.5.0
156
  = 1.1.7 =
197
 
198
  == Upgrade Notice ==
199
 
200
+ = 1.1.9 =
201
+ * Tested OK with WC 3.5.1
202
+ * Feedback on uninstall
styles/wf-style.css CHANGED
@@ -132,6 +132,11 @@
132
  box-shadow: none;
133
  padding: 7px 10px;
134
  }
 
 
 
 
 
135
  .bg-white{
136
  background: #fff;
137
  }
@@ -142,4 +147,6 @@
142
  background: #5ccc96;
143
  color: white;
144
  border-color: #5ccc96;
145
- }
 
 
132
  box-shadow: none;
133
  padding: 7px 10px;
134
  }
135
+
136
+ #datagrid .input-text{
137
+ margin-left: auto;
138
+ display: block;
139
+ }
140
  .bg-white{
141
  background: #fff;
142
  }
147
  background: #5ccc96;
148
  color: white;
149
  border-color: #5ccc96;
150
+ }
151
+ .wt-userimport-rating-link{color:yellow;}
152
+ .review-and-deactivate{color: #aa0073;}