Import users from CSV with meta - Version 1.14.1.1

Version Description

  • We have changed some empty() check to ==
Download this release

Release Info

Developer carazo
Plugin Icon 128x128 Import users from CSV with meta
Version 1.14.1.1
Comparing to
See all releases

Code changes from version 1.14.1 to 1.14.1.1

import-users-from-csv-with-meta.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Import users from CSV with meta
4
  Plugin URI: https://www.codection.com
5
  Description: This plugins allows to import users using CSV files to WP database automatically
6
- Version: 1.14.1
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
3
  Plugin Name: Import users from CSV with meta
4
  Plugin URI: https://www.codection.com
5
  Description: This plugins allows to import users using CSV files to WP database automatically
6
+ Version: 1.14.1.1
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
importer.php CHANGED
@@ -414,7 +414,7 @@ function acui_import_users( $file, $form_data, $attach_id = 0, $is_cron = false,
414
 
415
  if( $columns > 2 ){
416
  for( $i = 2 ; $i < $columns; $i++ ):
417
- $data[$i] = apply_filters( 'pre_acui_import_single_user_single_data', $data[$i], $headers[$i], $i);
418
 
419
  if( !empty( $data ) ){
420
  if( strtolower( $headers[ $i ] ) == "password" ){ // passwords -> continue
@@ -426,7 +426,7 @@ function acui_import_users( $file, $form_data, $attach_id = 0, $is_cron = false,
426
  continue;
427
  }
428
  elseif( in_array( $headers[ $i ], $wp_users_fields ) ){ // wp_user data
429
- if( empty( $data[ $i ] ) && $empty_cell_action == "leave" ){
430
  continue;
431
  }
432
  else{
@@ -501,8 +501,7 @@ function acui_import_users( $file, $form_data, $attach_id = 0, $is_cron = false,
501
  elseif( $headers[ $i ] == 'bp_group_role' ){
502
  continue;
503
  }
504
- else{ // wp_usermeta data
505
-
506
  if( $data[ $i ] === '' ){
507
  if( $empty_cell_action == "delete" )
508
  delete_user_meta( $user_id, $headers[ $i ] );
414
 
415
  if( $columns > 2 ){
416
  for( $i = 2 ; $i < $columns; $i++ ):
417
+ $data[$i] = apply_filters( 'pre_acui_import_single_user_single_data', $data[$i], $headers[$i], $i );
418
 
419
  if( !empty( $data ) ){
420
  if( strtolower( $headers[ $i ] ) == "password" ){ // passwords -> continue
426
  continue;
427
  }
428
  elseif( in_array( $headers[ $i ], $wp_users_fields ) ){ // wp_user data
429
+ if( $data[ $i ] === '' && $empty_cell_action == "leave" ){
430
  continue;
431
  }
432
  else{
501
  elseif( $headers[ $i ] == 'bp_group_role' ){
502
  continue;
503
  }
504
+ else{ // wp_usermeta data
 
505
  if( $data[ $i ] === '' ){
506
  if( $empty_cell_action == "delete" )
507
  delete_user_meta( $user_id, $headers[ $i ] );
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.2.1
7
- Stable tag: 1.14.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -91,6 +91,9 @@ Plugin will automatically detect:
91
 
92
  == Changelog ==
93
 
 
 
 
94
  = 1.14.1 =
95
  * Compatibility with Groups plugin (https://es.wordpress.org/plugins/groups/)
96
 
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.2.1
7
+ Stable tag: 1.14.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
91
 
92
  == Changelog ==
93
 
94
+ = 1.14.1.1 =
95
+ * We have changed some empty() check to === '' check, to avoid problems with values like blank spaces (thanks to https://wordpress.org/support/topic/not-importing-fields-with-just-spaces/#post-11597406)
96
+
97
  = 1.14.1 =
98
  * Compatibility with Groups plugin (https://es.wordpress.org/plugins/groups/)
99