Import users from CSV with meta - Version 1.20.1

Version Description

  • Fixed an issue that caused the new import screen to be displayed as part of the import results screen
  • Improved the way this plugin displays with the other WordPress export tools
  • Notice improved when an email exists in the system with other username
Download this release

Release Info

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

Code changes from version 1.20 to 1.20.1

classes/email-templates.php CHANGED
@@ -18,10 +18,10 @@ class ACUI_Email_Template{
18
  return;
19
 
20
  $labels = array(
21
- 'name' => _x( 'Email templates (Import Users From CSV With Meta)', 'Post Type General Name', 'import-users-from-csv-with-meta' ),
22
- 'singular_name' => _x( 'Email template (Import Users From CSV With Meta)', 'Post Type Singular Name', 'import-users-from-csv-with-meta' ),
23
- 'menu_name' => __( 'Email templates (Import Users)', 'import-users-from-csv-with-meta' ),
24
- 'name_admin_bar' => __( 'Email templates (Import Users From CSV With Meta)', 'import-users-from-csv-with-meta' ),
25
  'archives' => __( 'Item Archives', 'import-users-from-csv-with-meta' ),
26
  'attributes' => __( 'Item Attributes', 'import-users-from-csv-with-meta' ),
27
  'parent_item_colon' => __( 'Parent Item:', 'import-users-from-csv-with-meta' ),
18
  return;
19
 
20
  $labels = array(
21
+ 'name' => _x( 'Email templates (Import and Export Users and Customers)', 'Post Type General Name', 'import-users-from-csv-with-meta' ),
22
+ 'singular_name' => _x( 'Email template (Import and Export Users and Customers)', 'Post Type Singular Name', 'import-users-from-csv-with-meta' ),
23
+ 'menu_name' => __( 'Email templates', 'import-users-from-csv-with-meta' ),
24
+ 'name_admin_bar' => __( 'Email templates (Import and Export Users and Customers)', 'import-users-from-csv-with-meta' ),
25
  'archives' => __( 'Item Archives', 'import-users-from-csv-with-meta' ),
26
  'attributes' => __( 'Item Attributes', 'import-users-from-csv-with-meta' ),
27
  'parent_item_colon' => __( 'Parent Item:', 'import-users-from-csv-with-meta' ),
classes/import.php CHANGED
@@ -22,8 +22,10 @@ class ACUI_Import{
22
  case 'homepage':
23
  ACUISettings()->save_multiple( 'import_backend', $_POST );
24
 
25
- if( isset( $_POST['uploadfile'] ) && !empty( $_POST['uploadfile'] ) )
26
  $this->fileupload_process( $_POST, false );
 
 
27
  break;
28
 
29
  case 'frontend':
@@ -505,7 +507,7 @@ class ACUI_Import{
505
 
506
  $new_user_id = $acui_helper->maybe_update_email( $user_id, $email, $password, $update_emails_existing_users );
507
  if( empty( $new_user_id ) ){
508
- $errors[] = $acui_helper->new_error( $row, $errors_totals, sprintf( __( 'User with email "%s" exists, we ignore it', 'import-users-from-csv-with-meta' ), $email ), 'notice' );
509
  array_push( $users_ignored, $new_user_id );
510
  continue;
511
  }
22
  case 'homepage':
23
  ACUISettings()->save_multiple( 'import_backend', $_POST );
24
 
25
+ if( isset( $_POST['uploadfile'] ) && !empty( $_POST['uploadfile'] ) ){
26
  $this->fileupload_process( $_POST, false );
27
+ return;
28
+ }
29
  break;
30
 
31
  case 'frontend':
507
 
508
  $new_user_id = $acui_helper->maybe_update_email( $user_id, $email, $password, $update_emails_existing_users );
509
  if( empty( $new_user_id ) ){
510
+ $errors[] = $acui_helper->new_error( $row, $errors_totals, sprintf( __( 'User with email "%s" exists with other username, we ignore it', 'import-users-from-csv-with-meta' ), $email ), 'notice' );
511
  array_push( $users_ignored, $new_user_id );
512
  continue;
513
  }
classes/wp-importer.php CHANGED
@@ -16,9 +16,30 @@ class ACUI_WP_Importer_GUI{
16
  echo "<script>document.location.href='" . admin_url( 'tools.php?page=acui' ) . "'</script>";
17
  }
18
 
19
- function exporter(){
20
- ?>
21
- <p><?php printf( __( 'You can also export users and customers in CSV format, filtering by user created date, role, choosing the delimiter and some other options using <a href="%s">this exporter</a>.', 'import-users-from-csv-with-meta' ), admin_url( 'tools.php?page=acui&tab=export' ) ); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  <?php
23
  }
24
  }
16
  echo "<script>document.location.href='" . admin_url( 'tools.php?page=acui' ) . "'</script>";
17
  }
18
 
19
+ function exporter(){
20
+ $title = function_exists( 'is_woocommerce' ) ? __( 'Users and customers (in CSV format)', 'import-users-from-csv-with-meta' ) : __( 'Users (in CSV format)', 'import-users-from-csv-with-meta' );?>
21
+ <p><label><input type="radio" name="content" value="users" aria-describedby="Users"> <?php echo $title; ?></label></p>
22
+ <script>
23
+ jQuery( document ).ready( function( $ ){
24
+ $( '#export-filters' ).submit( function( e ){
25
+ if( $('input[type="radio"][name="content"][value="users"').is(':checked') ){
26
+ document.location.href='<?php echo admin_url( 'tools.php?page=acui&tab=export' ); ?>';
27
+ return false;
28
+ }
29
+
30
+ return true;
31
+ } );
32
+
33
+ $( 'input[type="radio"][name="content"]' ).change( function(){
34
+ if( $( this ).val() == 'users' ){
35
+ $( '#submit' ).val( '<?php _e( 'Choose options...', 'import-users-from-csv-with-meta' ); ?>' );
36
+ }
37
+ else{
38
+ $( '#submit' ).val( '<?php _e( 'Download Export File' ) ?>' );
39
+ }
40
+ });
41
+ } )
42
+ </script>
43
  <?php
44
  }
45
  }
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.20
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
@@ -14,7 +14,7 @@ Domain Path: /languages
14
  if ( ! defined( 'ABSPATH' ) )
15
  exit;
16
 
17
- define( 'ACUI_VERSION', '1.20' );
18
 
19
  class ImportExportUsersCustomers{
20
  var $file;
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.20.1
7
  Author: codection
8
  Author URI: https://codection.com
9
  License: GPL2
14
  if ( ! defined( 'ABSPATH' ) )
15
  exit;
16
 
17
+ define( 'ACUI_VERSION', '1.20.1' );
18
 
19
  class ImportExportUsersCustomers{
20
  var $file;
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: carazo, hornero
3
  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: 6.0.1
7
- Stable tag: 1.19.4
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -107,6 +107,11 @@ Plugin will automatically detect:
107
 
108
  == Changelog ==
109
 
 
 
 
 
 
110
  = 1.20 =
111
  * New settings API in plugin
112
  * Settings API working in backend import (in other tabs it will be working in next versions)
3
  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: 6.0.2
7
+ Stable tag: 1.20.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
107
 
108
  == Changelog ==
109
 
110
+ = 1.20.1 =
111
+ * Fixed an issue that caused the new import screen to be displayed as part of the import results screen
112
+ * Improved the way this plugin displays with the other WordPress export tools
113
+ * Notice improved when an email exists in the system with other username
114
+
115
  = 1.20 =
116
  * New settings API in plugin
117
  * Settings API working in backend import (in other tabs it will be working in next versions)