Version Description
- New filters added
Download this release
Release Info
Developer | carazo |
Plugin | Import users from CSV with meta |
Version | 1.15.4.2 |
Comparing to | |
See all releases |
Code changes from version 1.15.4.1 to 1.15.4.2
- classes/export.php +5 -5
- classes/homepage.php +12 -3
- import-users-from-csv-with-meta.php +2 -1
- readme.txt +4 -1
classes/export.php
CHANGED
@@ -81,7 +81,7 @@ class ACUI_Exporter{
|
|
81 |
|
82 |
function prepare( $key, $value, $datetime_format ){
|
83 |
$timestamp_keys = array( 'wc_last_active' );
|
84 |
-
$non_date_keys = array( 'billing_phone' );
|
85 |
|
86 |
if( is_array( $value ) )
|
87 |
return serialize( $value );
|
@@ -148,7 +148,7 @@ class ACUI_Exporter{
|
|
148 |
|
149 |
$row[] = "role";
|
150 |
|
151 |
-
foreach ( $this->
|
152 |
$row[] = $key;
|
153 |
}
|
154 |
|
@@ -166,7 +166,7 @@ class ACUI_Exporter{
|
|
166 |
|
167 |
$row[] = $this->get_role( $user );
|
168 |
|
169 |
-
foreach ( $this->
|
170 |
$row[] = $this->prepare( $key, get_user_meta( $user, $key, true ), $datetime_format );
|
171 |
}
|
172 |
|
@@ -204,7 +204,7 @@ class ACUI_Exporter{
|
|
204 |
wp_die();
|
205 |
}
|
206 |
|
207 |
-
function
|
208 |
global $wpdb;
|
209 |
$meta_keys = array();
|
210 |
|
@@ -214,7 +214,7 @@ class ACUI_Exporter{
|
|
214 |
foreach ($usermeta as $key => $value) {
|
215 |
$meta_keys[] = $value["meta_key"];
|
216 |
}
|
217 |
-
return $meta_keys;
|
218 |
}
|
219 |
|
220 |
function get_user_id_list( $role, $from, $to ){
|
81 |
|
82 |
function prepare( $key, $value, $datetime_format ){
|
83 |
$timestamp_keys = array( 'wc_last_active' );
|
84 |
+
$non_date_keys = apply_filters( 'acui_export_non_date_keys', array( 'billing_phone' ) );
|
85 |
|
86 |
if( is_array( $value ) )
|
87 |
return serialize( $value );
|
148 |
|
149 |
$row[] = "role";
|
150 |
|
151 |
+
foreach ( $this->get_user_meta_keys() as $key ) {
|
152 |
$row[] = $key;
|
153 |
}
|
154 |
|
166 |
|
167 |
$row[] = $this->get_role( $user );
|
168 |
|
169 |
+
foreach ( $this->get_user_meta_keys() as $key ) {
|
170 |
$row[] = $this->prepare( $key, get_user_meta( $user, $key, true ), $datetime_format );
|
171 |
}
|
172 |
|
204 |
wp_die();
|
205 |
}
|
206 |
|
207 |
+
function get_user_meta_keys() {
|
208 |
global $wpdb;
|
209 |
$meta_keys = array();
|
210 |
|
214 |
foreach ($usermeta as $key => $value) {
|
215 |
$meta_keys[] = $value["meta_key"];
|
216 |
}
|
217 |
+
return apply_filters( 'acui_export_get_user_meta_keys', $meta_keys );
|
218 |
}
|
219 |
|
220 |
function get_user_id_list( $role, $from, $to ){
|
classes/homepage.php
CHANGED
@@ -23,7 +23,7 @@ class ACUI_Homepage{
|
|
23 |
|
24 |
<div class="main_bar">
|
25 |
<form method="POST" enctype="multipart/form-data" action="" accept-charset="utf-8" onsubmit="return check();">
|
26 |
-
<h2><?php _e( '
|
27 |
<table class="form-table">
|
28 |
<tbody>
|
29 |
|
@@ -40,7 +40,12 @@ class ACUI_Homepage{
|
|
40 |
</div>
|
41 |
</td>
|
42 |
</tr>
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
44 |
<tr class="form-field">
|
45 |
<th scope="row"><label for="role"><?php _e( 'Default role', 'import-users-from-csv-with-meta' ); ?></label></th>
|
46 |
<td>
|
@@ -58,7 +63,12 @@ class ACUI_Homepage{
|
|
58 |
<p class="description"><?php _e( 'You can also import roles from a CSV column. Please read documentation tab to see how it can be done. If you choose more than one role, the roles would be assigned correctly but you should use some plugin like <a href="https://wordpress.org/plugins/user-role-editor/">User Role Editor</a> to manage them.', 'import-users-from-csv-with-meta' ); ?></p>
|
59 |
</td>
|
60 |
</tr>
|
|
|
|
|
61 |
|
|
|
|
|
|
|
62 |
<tr class="form-field form-required">
|
63 |
<th scope="row"><label><?php _e( 'What should the plugin do with empty cells?', 'import-users-from-csv-with-meta' ); ?></label></th>
|
64 |
<td>
|
@@ -82,7 +92,6 @@ class ACUI_Homepage{
|
|
82 |
</p>
|
83 |
</td>
|
84 |
</tr>
|
85 |
-
|
86 |
</tbody>
|
87 |
</table>
|
88 |
|
23 |
|
24 |
<div class="main_bar">
|
25 |
<form method="POST" enctype="multipart/form-data" action="" accept-charset="utf-8" onsubmit="return check();">
|
26 |
+
<h2><?php _e( 'File', 'import-users-from-csv-with-meta'); ?></h2>
|
27 |
<table class="form-table">
|
28 |
<tbody>
|
29 |
|
40 |
</div>
|
41 |
</td>
|
42 |
</tr>
|
43 |
+
</tbody>
|
44 |
+
</table>
|
45 |
+
|
46 |
+
<h2><?php _e( 'Roles', 'import-users-from-csv-with-meta'); ?></h2>
|
47 |
+
<table class="form-table">
|
48 |
+
<tbody>
|
49 |
<tr class="form-field">
|
50 |
<th scope="row"><label for="role"><?php _e( 'Default role', 'import-users-from-csv-with-meta' ); ?></label></th>
|
51 |
<td>
|
63 |
<p class="description"><?php _e( 'You can also import roles from a CSV column. Please read documentation tab to see how it can be done. If you choose more than one role, the roles would be assigned correctly but you should use some plugin like <a href="https://wordpress.org/plugins/user-role-editor/">User Role Editor</a> to manage them.', 'import-users-from-csv-with-meta' ); ?></p>
|
64 |
</td>
|
65 |
</tr>
|
66 |
+
</tbody>
|
67 |
+
</table>
|
68 |
|
69 |
+
<h2><?php _e( 'Options', 'import-users-from-csv-with-meta'); ?></h2>
|
70 |
+
<table class="form-table">
|
71 |
+
<tbody>
|
72 |
<tr class="form-field form-required">
|
73 |
<th scope="row"><label><?php _e( 'What should the plugin do with empty cells?', 'import-users-from-csv-with-meta' ); ?></label></th>
|
74 |
<td>
|
92 |
</p>
|
93 |
</td>
|
94 |
</tr>
|
|
|
95 |
</tbody>
|
96 |
</table>
|
97 |
|
import-users-from-csv-with-meta.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Import and export users and customers
|
4 |
Plugin URI: https://www.codection.com
|
5 |
Description: Using this plugin you will be able to import and export users or customers choosing many options and interacting with lots of other plugins
|
6 |
-
Version: 1.15.4.
|
7 |
Author: codection
|
8 |
Author URI: https://codection.com
|
9 |
License: GPL2
|
@@ -446,6 +446,7 @@ function acui_cron_process(){
|
|
446 |
$form_data[ "role" ] = get_option( "acui_cron_role");
|
447 |
$form_data[ "update_roles_existing_users" ] = ( get_option( "acui_cron_update_roles_existing_users" ) ) ? 'yes' : 'no';
|
448 |
$form_data[ "empty_cell_action" ] = "leave";
|
|
|
449 |
$form_data[ "security" ] = wp_create_nonce( "codection-security" );
|
450 |
|
451 |
ob_start();
|
3 |
Plugin Name: Import and export users and customers
|
4 |
Plugin URI: https://www.codection.com
|
5 |
Description: Using this plugin you will be able to import and export users or customers choosing many options and interacting with lots of other plugins
|
6 |
+
Version: 1.15.4.2
|
7 |
Author: codection
|
8 |
Author URI: https://codection.com
|
9 |
License: GPL2
|
446 |
$form_data[ "role" ] = get_option( "acui_cron_role");
|
447 |
$form_data[ "update_roles_existing_users" ] = ( get_option( "acui_cron_update_roles_existing_users" ) ) ? 'yes' : 'no';
|
448 |
$form_data[ "empty_cell_action" ] = "leave";
|
449 |
+
$form_data[ "allow_update_emails" ] = "disallow";
|
450 |
$form_data[ "security" ] = wp_create_nonce( "codection-security" );
|
451 |
|
452 |
ob_start();
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://codection.com/go/donate-import-users-from-csv-with-meta/
|
|
4 |
Tags: csv, import, importer, meta data, meta, user, users, user meta, editor, profile, custom, fields, delimiter, update, insert
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 5.3.2
|
7 |
-
Stable tag: 1.15.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -98,6 +98,9 @@ Plugin will automatically detect:
|
|
98 |
|
99 |
== Changelog ==
|
100 |
|
|
|
|
|
|
|
101 |
= 1.15.4.1 =
|
102 |
* Double email fixed
|
103 |
|
4 |
Tags: csv, import, importer, meta data, meta, user, users, user meta, editor, profile, custom, fields, delimiter, update, insert
|
5 |
Requires at least: 3.4
|
6 |
Tested up to: 5.3.2
|
7 |
+
Stable tag: 1.15.4.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
98 |
|
99 |
== Changelog ==
|
100 |
|
101 |
+
= 1.15.4.2 =
|
102 |
+
* New filters added
|
103 |
+
|
104 |
= 1.15.4.1 =
|
105 |
* Double email fixed
|
106 |
|