I don’t see where $return
is being set. Try changing
if( is_wp_error( $user_id ) ) {
echo $return->get_error_message();
}
to
if ( is_wp_error( $user_id ) ) {
echo $user_id->get_error_message();
}
…and that should hopefully display any error messages that are generated.