Skip to content

Commit

Permalink
Add dry run in donor impress-org#2419
Browse files Browse the repository at this point in the history
  • Loading branch information
raftaar1191 committed Dec 4, 2017
1 parent d2c6921 commit 765e407
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions includes/import-functions.php
Expand Up @@ -264,7 +264,6 @@ function give_import_get_user_from_csv( $data, $import_setting = array() ) {
}

$report['create_donor'] = ( ! empty( $report['create_donor'] ) ? ( absint( $report['create_donor'] ) + 1 ) : 1 );
} else {
}
} else {
// Add is used to ensure duplicate emails are not added
Expand All @@ -282,7 +281,7 @@ function give_import_get_user_from_csv( $data, $import_setting = array() ) {
if ( empty( $donor_data->id ) ) {
$donor_data = get_user_by( 'email', $data['email'] );

if ( empty( $donor_data->ID ) && ! empty( $data['first_name'] ) && ! empty( $data['last_name'] ) && isset( $import_setting['create_user'] ) && 1 === absint( $import_setting['create_user'] ) ) {
if ( empty( $donor_data->ID ) && ! empty( $data['first_name'] ) && ! empty( $data['last_name'] ) && empty( $import_setting['dry_run'] ) && isset( $import_setting['create_user'] ) && 1 === absint( $import_setting['create_user'] ) ) {
$give_role = (array) give_get_option( 'donor_default_user_role', get_option( 'default_role', ( ( $give_donor = wp_roles()->is_role( 'give_donor' ) ) && ! empty( $give_donor ) ? 'give_donor' : 'subscriber' ) ) );
$donor_args = array(
'user_login' => $data['email'],
Expand Down

0 comments on commit 765e407

Please sign in to comment.