Version Description
- Improvements.
Download this release
Release Info
Developer | webtoffee |
Plugin | Import Export WordPress Users and WooCommerce Customers |
Version | 2.1.0 |
Comparing to | |
See all releases |
Code changes from version 2.0.9 to 2.1.0
- admin/modules/export/assets/js/main.js +1 -1
- admin/modules/export/views/_export_post_type_page.php +1 -1
- admin/modules/import/assets/js/main.js +1 -1
- admin/modules/import/views/_import_post_type_page.php +1 -1
- admin/modules/user/import/import.php +19 -42
- admin/views/admin-settings-help.php +1 -1
- admin/views/market.php +1 -1
- includes/class-wt-import-export-for-woo.php +1 -1
- includes/class-wt-non-apache-info.php +115 -0
- readme.txt +5 -3
- users-customers-import-export-for-wp-woocommerce.php +10 -2
admin/modules/export/assets/js/main.js
CHANGED
@@ -5,7 +5,7 @@ var wt_iew_basic_export=(function( $ ) {
|
|
5 |
ajax_data:{},
|
6 |
selected_template:0,
|
7 |
selected_template_name:'',
|
8 |
-
to_export:'',
|
9 |
to_export_title:'',
|
10 |
export_method:'',
|
11 |
current_step:'',
|
5 |
ajax_data:{},
|
6 |
selected_template:0,
|
7 |
selected_template_name:'',
|
8 |
+
to_export:'user',
|
9 |
to_export_title:'',
|
10 |
export_method:'',
|
11 |
current_step:'',
|
admin/modules/export/views/_export_post_type_page.php
CHANGED
@@ -18,7 +18,7 @@ if (!defined('ABSPATH')) {
|
|
18 |
foreach($post_types as $key=>$value)
|
19 |
{
|
20 |
?>
|
21 |
-
|
22 |
<?php
|
23 |
}
|
24 |
?>
|
18 |
foreach($post_types as $key=>$value)
|
19 |
{
|
20 |
?>
|
21 |
+
<option value="<?php echo $key;?>" <?php selected($key, $key) ?> <?php echo ($item_type==$key ? 'selected' : '');?>><?php echo $value;?></option>
|
22 |
<?php
|
23 |
}
|
24 |
?>
|
admin/modules/import/assets/js/main.js
CHANGED
@@ -5,7 +5,7 @@ var wt_iew_basic_import=(function( $ ) {
|
|
5 |
ajax_data:{},
|
6 |
selected_template:0,
|
7 |
selected_template_name:'',
|
8 |
-
to_import:'',
|
9 |
to_import_title:'',
|
10 |
import_method:'',
|
11 |
current_step:'',
|
5 |
ajax_data:{},
|
6 |
selected_template:0,
|
7 |
selected_template_name:'',
|
8 |
+
to_import:'user',
|
9 |
to_import_title:'',
|
10 |
import_method:'',
|
11 |
current_step:'',
|
admin/modules/import/views/_import_post_type_page.php
CHANGED
@@ -15,7 +15,7 @@ if (!defined('ABSPATH')) {
|
|
15 |
<select name="wt_iew_import_post_type">
|
16 |
<option value="">-- <?php _e('Select post type'); ?> --</option>
|
17 |
<?php
|
18 |
-
$item_type = isset($item_type) ? $item_type : '';
|
19 |
foreach($post_types as $key=>$value)
|
20 |
{
|
21 |
?>
|
15 |
<select name="wt_iew_import_post_type">
|
16 |
<option value="">-- <?php _e('Select post type'); ?> --</option>
|
17 |
<?php
|
18 |
+
$item_type = isset($item_type) ? $item_type : 'user';
|
19 |
foreach($post_types as $key=>$value)
|
20 |
{
|
21 |
?>
|
admin/modules/user/import/import.php
CHANGED
@@ -31,31 +31,9 @@ class Wt_Import_Export_For_Woo_basic_User_Import {
|
|
31 |
public function __construct($parent_object) {
|
32 |
|
33 |
$this->parent_module = $parent_object;
|
34 |
-
|
35 |
-
$this->user_base_fields =
|
36 |
-
|
37 |
-
'customer_id' => 'customer_id',
|
38 |
-
'user_login' => 'user_login',
|
39 |
-
'user_pass' => 'user_pass',
|
40 |
-
'user_nicename' => 'user_nicename',
|
41 |
-
'user_email' => 'user_email',
|
42 |
-
'user_url' => 'user_url',
|
43 |
-
'user_registered' => 'user_registered',
|
44 |
-
'display_name' => 'display_name',
|
45 |
-
'first_name' => 'first_name',
|
46 |
-
'last_name' => 'last_name',
|
47 |
-
'user_status' => 'user_status',
|
48 |
-
'roles' => 'roles'
|
49 |
-
);
|
50 |
-
|
51 |
-
global $wpdb;
|
52 |
-
$meta_keys = $wpdb->get_col("SELECT distinct(meta_key) FROM $wpdb->usermeta");
|
53 |
-
|
54 |
-
foreach ($meta_keys as $meta_key) {
|
55 |
-
|
56 |
-
$this->user_meta_fields[$meta_key] = $meta_key;
|
57 |
-
|
58 |
-
}
|
59 |
|
60 |
|
61 |
}
|
@@ -223,19 +201,6 @@ class Wt_Import_Export_For_Woo_basic_User_Import {
|
|
223 |
//$user_details[$key] = isset( $item[$value] ) ? $item[$value] : "" ;
|
224 |
}
|
225 |
|
226 |
-
// adding metas from csv to user meta fields
|
227 |
-
foreach ($item as $key => $value) {
|
228 |
-
if ( strstr( $key, 'meta:' ) ){
|
229 |
-
$key_val =$key;
|
230 |
-
$key = trim(str_replace('meta:', '', $key));
|
231 |
-
|
232 |
-
// if($this->user_meta_fields[$key])
|
233 |
-
// continue;
|
234 |
-
|
235 |
-
$this->user_meta_fields[$key] = $key_val;
|
236 |
-
}
|
237 |
-
|
238 |
-
}
|
239 |
foreach ($this->user_meta_fields as $key => $value){
|
240 |
$user_meta[] = array( 'key' => $key, 'value' => isset( $item[$value] ) ? $item[$value] : "" );
|
241 |
}
|
@@ -271,7 +236,7 @@ class Wt_Import_Export_For_Woo_basic_User_Import {
|
|
271 |
if ($user_id && $this->merge) {
|
272 |
$current_user = get_current_user_id();
|
273 |
if ($current_user == $user_id) {
|
274 |
-
$usr_msg = '
|
275 |
$this->hf_log_data_change('user-csv-import', sprintf(__('> “%s”' . $usr_msg), $user_id), true);
|
276 |
unset($post);
|
277 |
return new WP_Error( 'parse-error',sprintf(__('> “%s”' . $usr_msg), $user_id));
|
@@ -320,6 +285,7 @@ class Wt_Import_Export_For_Woo_basic_User_Import {
|
|
320 |
$username = (!empty($data['user_details']['user_login']) ) ? $data['user_details']['user_login'] : '';
|
321 |
$customer_id = (!empty($data['user_details']['customer_id']) ) ? $data['user_details']['customer_id'] : '';
|
322 |
$insertion_id = (!empty($data['user_details']['ID']) ) ? $data['user_details']['ID'] : '';
|
|
|
323 |
|
324 |
if('email' == $this->merge_with){
|
325 |
$insertion_id = '';
|
@@ -377,7 +343,7 @@ class Wt_Import_Export_For_Woo_basic_User_Import {
|
|
377 |
require_once ABSPATH . 'wp-admin/includes/user.php';
|
378 |
}
|
379 |
$roles = get_editable_roles();
|
380 |
-
$new_roles_str = str_replace(' ', '', $data['user_details']['roles']);
|
381 |
|
382 |
if(empty($new_roles_str)){
|
383 |
$new_roles_str = get_option('default_role');
|
@@ -438,6 +404,9 @@ class Wt_Import_Export_For_Woo_basic_User_Import {
|
|
438 |
$meta_value = (!empty($meta_array[$key]) ) ? maybe_unserialize($meta_array[$key]) : '';
|
439 |
if ($key == $wpdb->prefix.'user_level' && $meta_value == ''){ $meta_value = 0;
|
440 |
}
|
|
|
|
|
|
|
441 |
update_user_meta($found_customer, $key, $meta_value);
|
442 |
}
|
443 |
|
@@ -453,12 +422,13 @@ class Wt_Import_Export_For_Woo_basic_User_Import {
|
|
453 |
if ($found_customer) {
|
454 |
$wp_user_object = new WP_User($found_customer);
|
455 |
$roles = get_editable_roles();
|
456 |
-
$new_rolse_input = isset($data['user_details']['roles']) ? $data['user_details']['roles'] : '';
|
457 |
$new_roles_str = str_replace(' ', '', $new_rolse_input);
|
458 |
$new_roles = explode(',', $new_roles_str);
|
459 |
$new_roles = array_intersect($new_roles, array_keys($roles));
|
460 |
$roles_to_remove = array();
|
461 |
$user_roles = array_intersect(array_values($wp_user_object->roles), array_keys($roles));
|
|
|
462 |
if (!$new_roles) {
|
463 |
// If there are no roles, delete all of the user's roles
|
464 |
$roles_to_remove = $user_roles;
|
@@ -490,6 +460,9 @@ class Wt_Import_Export_For_Woo_basic_User_Import {
|
|
490 |
if ($key == $wpdb->prefix.'user_level' && $meta_value == ''){
|
491 |
$meta_value = 0;
|
492 |
}
|
|
|
|
|
|
|
493 |
update_user_meta($found_customer, $key, $meta_value);
|
494 |
}
|
495 |
|
@@ -537,8 +510,12 @@ class Wt_Import_Export_For_Woo_basic_User_Import {
|
|
537 |
|
538 |
if ($this->use_same_password && isset($data['user_details']['user_pass']) && !empty($data['user_details']['user_pass'])) {
|
539 |
$password = $data['user_details']['user_pass'];
|
540 |
-
$user_data = array_merge($user_data, array('user_login' => $wp_user_object->user_login, 'user_email' => ( $email_updated ) ? $customer_email : $wp_user_object->user_email));
|
541 |
$user_data['user_pass'] = $password;
|
|
|
|
|
|
|
|
|
542 |
wp_insert_user($user_data);
|
543 |
}
|
544 |
|
31 |
public function __construct($parent_object) {
|
32 |
|
33 |
$this->parent_module = $parent_object;
|
34 |
+
$this->user_all_fields = include plugin_dir_path( __FILE__).'../data/data-user-columns.php';
|
35 |
+
$this->user_base_fields = array_slice($this->user_all_fields, 0, 13);
|
36 |
+
$this->user_meta_fields = array_slice($this->user_all_fields, 13);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
|
39 |
}
|
201 |
//$user_details[$key] = isset( $item[$value] ) ? $item[$value] : "" ;
|
202 |
}
|
203 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
foreach ($this->user_meta_fields as $key => $value){
|
205 |
$user_meta[] = array( 'key' => $key, 'value' => isset( $item[$value] ) ? $item[$value] : "" );
|
206 |
}
|
236 |
if ($user_id && $this->merge) {
|
237 |
$current_user = get_current_user_id();
|
238 |
if ($current_user == $user_id) {
|
239 |
+
$usr_msg = 'This user is currently logged in hence we cannot update.';
|
240 |
$this->hf_log_data_change('user-csv-import', sprintf(__('> “%s”' . $usr_msg), $user_id), true);
|
241 |
unset($post);
|
242 |
return new WP_Error( 'parse-error',sprintf(__('> “%s”' . $usr_msg), $user_id));
|
285 |
$username = (!empty($data['user_details']['user_login']) ) ? $data['user_details']['user_login'] : '';
|
286 |
$customer_id = (!empty($data['user_details']['customer_id']) ) ? $data['user_details']['customer_id'] : '';
|
287 |
$insertion_id = (!empty($data['user_details']['ID']) ) ? $data['user_details']['ID'] : '';
|
288 |
+
$merge_empty_cells = apply_filters('wt_user_import_empty_csv_column', FALSE);
|
289 |
|
290 |
if('email' == $this->merge_with){
|
291 |
$insertion_id = '';
|
343 |
require_once ABSPATH . 'wp-admin/includes/user.php';
|
344 |
}
|
345 |
$roles = get_editable_roles();
|
346 |
+
$new_roles_str = str_replace(' ', '', strtolower($data['user_details']['roles']));
|
347 |
|
348 |
if(empty($new_roles_str)){
|
349 |
$new_roles_str = get_option('default_role');
|
404 |
$meta_value = (!empty($meta_array[$key]) ) ? maybe_unserialize($meta_array[$key]) : '';
|
405 |
if ($key == $wpdb->prefix.'user_level' && $meta_value == ''){ $meta_value = 0;
|
406 |
}
|
407 |
+
if (empty($meta_value) && !$merge_empty_cells) {
|
408 |
+
continue;
|
409 |
+
}
|
410 |
update_user_meta($found_customer, $key, $meta_value);
|
411 |
}
|
412 |
|
422 |
if ($found_customer) {
|
423 |
$wp_user_object = new WP_User($found_customer);
|
424 |
$roles = get_editable_roles();
|
425 |
+
$new_rolse_input = isset($data['user_details']['roles']) ? strtolower($data['user_details']['roles']) : '';
|
426 |
$new_roles_str = str_replace(' ', '', $new_rolse_input);
|
427 |
$new_roles = explode(',', $new_roles_str);
|
428 |
$new_roles = array_intersect($new_roles, array_keys($roles));
|
429 |
$roles_to_remove = array();
|
430 |
$user_roles = array_intersect(array_values($wp_user_object->roles), array_keys($roles));
|
431 |
+
$merge_empty_cells = apply_filters('wt_user_import_empty_csv_column', FALSE);
|
432 |
if (!$new_roles) {
|
433 |
// If there are no roles, delete all of the user's roles
|
434 |
$roles_to_remove = $user_roles;
|
460 |
if ($key == $wpdb->prefix.'user_level' && $meta_value == ''){
|
461 |
$meta_value = 0;
|
462 |
}
|
463 |
+
if (empty($meta_value) && !$merge_empty_cells) {
|
464 |
+
continue;
|
465 |
+
}
|
466 |
update_user_meta($found_customer, $key, $meta_value);
|
467 |
}
|
468 |
|
510 |
|
511 |
if ($this->use_same_password && isset($data['user_details']['user_pass']) && !empty($data['user_details']['user_pass'])) {
|
512 |
$password = $data['user_details']['user_pass'];
|
513 |
+
$user_data = array_merge($user_data, array('user_login' => $wp_user_object->user_login, 'user_email' => ( $email_updated ) ? $customer_email : $wp_user_object->user_email, 'user_url' =>$wp_user_object->user_url));
|
514 |
$user_data['user_pass'] = $password;
|
515 |
+
$user_default_meta = array('nickname','first_name','last_name','display_name','description','rich_editing','syntax_highlighting','comment_shortcuts','admin_color','use_ssl','show_admin_bar_front','locale');
|
516 |
+
foreach ($user_default_meta as $meta_key => $meta) {
|
517 |
+
$user_data[$meta] = $wp_user_object->$meta;
|
518 |
+
}
|
519 |
wp_insert_user($user_data);
|
520 |
}
|
521 |
|
admin/views/admin-settings-help.php
CHANGED
@@ -16,7 +16,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
16 |
<img src="<?php echo WT_U_IEW_PLUGIN_URL;?>assets/images/documentation.png">
|
17 |
<h3><?php _e('Documentation'); ?></h3>
|
18 |
<p><?php _e('Refer to our documentation to set up and get started.'); ?></p>
|
19 |
-
<a target="_blank" href="https://www.webtoffee.com/
|
20 |
<?php _e('Documentation'); ?>
|
21 |
</a>
|
22 |
</li>
|
16 |
<img src="<?php echo WT_U_IEW_PLUGIN_URL;?>assets/images/documentation.png">
|
17 |
<h3><?php _e('Documentation'); ?></h3>
|
18 |
<p><?php _e('Refer to our documentation to set up and get started.'); ?></p>
|
19 |
+
<a target="_blank" href="https://www.webtoffee.com/user-import-export-plugin-wordpress-user-guide/" class="button button-primary">
|
20 |
<?php _e('Documentation'); ?>
|
21 |
</a>
|
22 |
</li>
|
admin/views/market.php
CHANGED
@@ -97,7 +97,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
97 |
<li style="text-align: center;"><?php echo __('30 Day Money Back Guarantee','users-customers-import-export-for-wp-woocommerce'); ?></li>
|
98 |
<li style="text-align: center;"><?php echo __('Fast and Superior Support','users-customers-import-export-for-wp-woocommerce'); ?></li>
|
99 |
<li style="text-align: center;">
|
100 |
-
<a href="https://www.webtoffee.com/product/wordpress-users-woocommerce-customers-import-export/?utm_source=free_plugin_sidebar&utm_medium=user_imp_exp_basic&utm_campaign=User_Import_Export&utm_content=2.0
|
101 |
</li>
|
102 |
</ul>
|
103 |
<span>
|
97 |
<li style="text-align: center;"><?php echo __('30 Day Money Back Guarantee','users-customers-import-export-for-wp-woocommerce'); ?></li>
|
98 |
<li style="text-align: center;"><?php echo __('Fast and Superior Support','users-customers-import-export-for-wp-woocommerce'); ?></li>
|
99 |
<li style="text-align: center;">
|
100 |
+
<a href="https://www.webtoffee.com/product/wordpress-users-woocommerce-customers-import-export/?utm_source=free_plugin_sidebar&utm_medium=user_imp_exp_basic&utm_campaign=User_Import_Export&utm_content=2.1.0" target="_blank" class="button button-primary button-go-pro"><?php _e('Upgrade to Premium', 'users-customers-import-export-for-wp-woocommerce'); ?></a>
|
101 |
</li>
|
102 |
</ul>
|
103 |
<span>
|
includes/class-wt-import-export-for-woo.php
CHANGED
@@ -80,7 +80,7 @@ class Wt_Import_Export_For_Woo_Basic {
|
|
80 |
if ( defined( 'WT_U_IEW_VERSION' ) ) {
|
81 |
$this->version = WT_U_IEW_VERSION;
|
82 |
} else {
|
83 |
-
$this->version = '2.0
|
84 |
}
|
85 |
$this->plugin_name = 'wt-import-export-for-woo-basic';
|
86 |
|
80 |
if ( defined( 'WT_U_IEW_VERSION' ) ) {
|
81 |
$this->version = WT_U_IEW_VERSION;
|
82 |
} else {
|
83 |
+
$this->version = '2.1.0';
|
84 |
}
|
85 |
$this->plugin_name = 'wt-import-export-for-woo-basic';
|
86 |
|
includes/class-wt-non-apache-info.php
ADDED
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
if ( !defined( 'ABSPATH' ) ) {
|
3 |
+
exit;
|
4 |
+
}
|
5 |
+
if ( !class_exists( 'wt_inform_server_secure' ) ) {
|
6 |
+
|
7 |
+
class wt_inform_server_secure {
|
8 |
+
|
9 |
+
/**
|
10 |
+
* config options
|
11 |
+
*/
|
12 |
+
public $plugin = "";
|
13 |
+
public $banner_message = "";
|
14 |
+
public $sholud_show_server_info = '';
|
15 |
+
|
16 |
+
public function __construct( $plugin ) {
|
17 |
+
$this->plugin = $plugin;
|
18 |
+
$this->sholud_show_server_info = 'wt_' . $this->plugin . '_show_server_info';
|
19 |
+
|
20 |
+
if ( !$this->wt_get_display_server_info() ) {
|
21 |
+
if ( Wt_Import_Export_For_Woo_Basic_Common_Helper::wt_is_screen_allowed() ) {
|
22 |
+
$this->banner_css_class = 'wt_' . $this->plugin . '_show_server_info';
|
23 |
+
add_action( 'admin_notices', array( $this, 'show_banner' ) );
|
24 |
+
add_action( 'admin_print_footer_scripts', array( $this, 'add_banner_scripts' ) ); /* add banner scripts */
|
25 |
+
}
|
26 |
+
}
|
27 |
+
$this->ajax_action_name = $this->plugin . '_process_show_server_info_action';
|
28 |
+
add_action( 'wp_ajax_' . $this->ajax_action_name, array( $this, 'process_server_info__action' ) ); /* process banner user action */
|
29 |
+
}
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Prints the banner
|
33 |
+
*/
|
34 |
+
public function show_banner() {
|
35 |
+
?>
|
36 |
+
<div class="<?php echo $this->banner_css_class; ?> notice-warning notice is-dismissible">
|
37 |
+
|
38 |
+
<p>
|
39 |
+
<?php echo $this->banner_message; ?>
|
40 |
+
</p>
|
41 |
+
<p>
|
42 |
+
<?php if ( (strpos( $_SERVER[ 'SERVER_SOFTWARE' ], 'nginx' ) !== false ) ): ?>
|
43 |
+
<h4><?php _e( 'Incase of Nginx server, copy the below code into your server config file to restrict public access to the wp-content folder or contact the server team to assist accordingly.' ); ?></h4>
|
44 |
+
<code>
|
45 |
+
#Deny access to wp-content folders<br/>
|
46 |
+
location ~* ^/(wp-content)/(.*?)\.(zip|gz|tar|csv|bzip2|7z)\$ { deny all; }<br/>
|
47 |
+
location ~ ^/wp-content/webtoffee_import { deny all; }
|
48 |
+
</code>
|
49 |
+
<?php endif; ?>
|
50 |
+
</p>
|
51 |
+
</div>
|
52 |
+
<?php
|
53 |
+
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Ajax hook to process user action on the banner
|
57 |
+
*/
|
58 |
+
public function process_server_info__action() {
|
59 |
+
check_ajax_referer( $this->plugin );
|
60 |
+
if ( isset( $_POST[ 'wt_action_type' ] ) && 'dismiss' == $_POST[ 'wt_action_type' ] ) {
|
61 |
+
$this->wt_set_display_server_info( 1 );
|
62 |
+
}
|
63 |
+
exit();
|
64 |
+
}
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Add banner JS to admin footer
|
68 |
+
*/
|
69 |
+
public function add_banner_scripts() {
|
70 |
+
$ajax_url = admin_url( 'admin-ajax.php' );
|
71 |
+
$nonce = wp_create_nonce( $this->plugin );
|
72 |
+
?>
|
73 |
+
<script type="text/javascript">
|
74 |
+
( function ( $ ) {
|
75 |
+
"use strict";
|
76 |
+
|
77 |
+
/* prepare data object */
|
78 |
+
var data_obj = {
|
79 |
+
_wpnonce: '<?php echo $nonce; ?>',
|
80 |
+
action: '<?php echo $this->ajax_action_name; ?>',
|
81 |
+
wt_action_type: 'dismiss',
|
82 |
+
};
|
83 |
+
|
84 |
+
$( document ).on( 'click', '.<?php echo $this->banner_css_class; ?> .notice-dismiss', function ( e )
|
85 |
+
{
|
86 |
+
e.preventDefault();
|
87 |
+
$.ajax( {
|
88 |
+
url: '<?php echo $ajax_url; ?>',
|
89 |
+
data: data_obj,
|
90 |
+
type: 'POST',
|
91 |
+
} );
|
92 |
+
|
93 |
+
} );
|
94 |
+
|
95 |
+
} )( jQuery )
|
96 |
+
</script>
|
97 |
+
<?php
|
98 |
+
}
|
99 |
+
|
100 |
+
public function wt_get_display_server_info() {
|
101 |
+
|
102 |
+
if ( (strpos( $_SERVER[ 'SERVER_SOFTWARE' ], 'Apache' ) !== false) || (strpos( $_SERVER[ 'SERVER_SOFTWARE' ], 'LiteSpeed' ) !== false) ) {
|
103 |
+
return true;
|
104 |
+
} else {
|
105 |
+
return (bool) get_option( $this->sholud_show_server_info );
|
106 |
+
}
|
107 |
+
}
|
108 |
+
|
109 |
+
public function wt_set_display_server_info( $display = false ) {
|
110 |
+
update_option( $this->sholud_show_server_info, $display ? 1 : 0 );
|
111 |
+
}
|
112 |
+
|
113 |
+
}
|
114 |
+
|
115 |
+
}
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: user import, user export, csv, woocommerce, customers, import, export, exp
|
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 2.0
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
@@ -218,6 +218,8 @@ Yes, you can update the user data with the help of this plugin. The users will b
|
|
218 |
12. WordPress user import export log
|
219 |
|
220 |
== Changelog ==
|
|
|
|
|
221 |
= 2.0.9 =
|
222 |
* Plugin name update.
|
223 |
= 2.0.8 =
|
@@ -374,5 +376,5 @@ Yes, you can update the user data with the help of this plugin. The users will b
|
|
374 |
|
375 |
== Upgrade Notice ==
|
376 |
|
377 |
-
= 2.0
|
378 |
-
*
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 2.1.0
|
9 |
License: GPLv3
|
10 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
11 |
|
218 |
12. WordPress user import export log
|
219 |
|
220 |
== Changelog ==
|
221 |
+
= 2.1.0 =
|
222 |
+
* Improvements.
|
223 |
= 2.0.9 =
|
224 |
* Plugin name update.
|
225 |
= 2.0.8 =
|
376 |
|
377 |
== Upgrade Notice ==
|
378 |
|
379 |
+
= 2.1.0 =
|
380 |
+
* Improvements.
|
users-customers-import-export-for-wp-woocommerce.php
CHANGED
@@ -6,7 +6,7 @@
|
|
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: 2.0
|
10 |
WC tested up to: 5.1.0
|
11 |
Text Domain: users-customers-import-export-for-wp-woocommerce
|
12 |
License: GPLv3
|
@@ -43,7 +43,7 @@ if ( ! defined( 'WT_IEW_DEBUG_BASIC' ) ) {
|
|
43 |
* Start at version 1.0.0 and use SemVer - https://semver.org
|
44 |
* Rename this for your plugin and update it as you release new versions.
|
45 |
*/
|
46 |
-
define( 'WT_U_IEW_VERSION', '2.0
|
47 |
|
48 |
/**
|
49 |
* The code that runs during plugin activation.
|
@@ -182,3 +182,11 @@ $user_egecy_menu->old_menu_params = array(array('parent_slug'=>'users.php', 'men
|
|
182 |
);
|
183 |
|
184 |
include_once 'user_import_export_review_request.php';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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: 2.1.0
|
10 |
WC tested up to: 5.1.0
|
11 |
Text Domain: users-customers-import-export-for-wp-woocommerce
|
12 |
License: GPLv3
|
43 |
* Start at version 1.0.0 and use SemVer - https://semver.org
|
44 |
* Rename this for your plugin and update it as you release new versions.
|
45 |
*/
|
46 |
+
define( 'WT_U_IEW_VERSION', '2.1.0' );
|
47 |
|
48 |
/**
|
49 |
* The code that runs during plugin activation.
|
182 |
);
|
183 |
|
184 |
include_once 'user_import_export_review_request.php';
|
185 |
+
|
186 |
+
|
187 |
+
// Add dismissible server info for file restrictions
|
188 |
+
include_once plugin_dir_path( __FILE__ ) . 'includes/class-wt-non-apache-info.php';
|
189 |
+
$inform_server_secure = new wt_inform_server_secure('user');
|
190 |
+
$inform_server_secure->plugin_title = "User Import Export";
|
191 |
+
$inform_server_secure->banner_message = sprintf(__("The <b>%s</b> plugin uploads the imported file into <b>wp-content/webtoffee_import</b> folder. Please ensure that public access restrictions are set in your server for this folder."), $inform_server_secure->plugin_title);
|
192 |
+
|