Jake Vanderwerf
2026-08-28 a9654f00c8fbc9934289d761843ddd071025013f
inc/importers/JaneAppClientImporter.php
@@ -1,6 +1,7 @@
<?php
namespace JVBase\importers;
use Exception;
use WP_Error;
if (!defined('ABSPATH')) {
@@ -125,7 +126,7 @@
         // Commit transaction
         $this->wpdb->query('COMMIT');
      } catch (\Exception $e) {
      } catch (Exception $e) {
         // Rollback on error
         $this->wpdb->query('ROLLBACK');
         fclose($handle);
@@ -320,11 +321,11 @@
      }
      // Get the role from options with proper fallback
      $role = $options['default_role'] ?? get_option(BASE . 'client_import_role', JVB_USER);
      $role = $options['default_role'] ?? get_option(BASE . 'client_import_role', BASE.'client');
      // Ensure role exists, fallback to JVB_USER if not
      // Ensure role exists
      if (!get_role($role)) {
         $role = JVB_USER;
         return new WP_Error('invalid_role', 'Invalid role');
      }
      // Create user