I have some issues with this method:
funtion AddUser($data){
$WP_array = array(
'user_login' => "info here",
'user_email' => "info here",
'user_pass' => "info here",
'first_name' => "info here",
'last_name' => "info here",
'role' => "info here",
'show_admin_bar_front' => "info here",
) ;
$user_id = wp_insert_user($WP_array);
}
After adding the new user,wordpress automatically sends an empty email D: so what can I do to prevent that, I actually used on my functions.php
add_action( 'init', function() {
remove_action( 'register_new_user', 'wp_send_new_user_notifications' );
});
Do you have any clue ?
Thank you in advance