Jake Vanderwerf
2026-08-28 a9654f00c8fbc9934289d761843ddd071025013f
inc/rest/routes/ImporterRoutes.php
@@ -9,7 +9,6 @@
use JVBase\rest\Route;
use WP_REST_Request;
use WP_REST_Response;
use WP_Error;
if (!defined('ABSPATH')) {
   exit;
@@ -76,14 +75,14 @@
      // Get uploaded file
      $files = $request->get_file_params();
      if (empty($files['file'])) {
         return $this->error('No file uploaded', 'no_file', 400);
         return $this->error('No file uploaded', 'no_file');
      }
      $file = $files['file'];
      // Validate file type
      if (!$this->isValidCSV($file)) {
         return $this->error('Invalid file type. Please upload a CSV file.', 'invalid_file', 400);
         return $this->error('Invalid file type. Please upload a CSV file.', 'invalid_file');
      }
      // Get and parse options
@@ -140,14 +139,14 @@
      // Get uploaded file
      $files = $request->get_file_params();
      if (empty($files['file'])) {
         return $this->error('No file uploaded', 'no_file', 400);
         return $this->error('No file uploaded', 'no_file');
      }
      $file = $files['file'];
      // Validate file type
      if (!$this->isValidCSV($file)) {
         return $this->error('Invalid file type. Please upload a CSV file.', 'invalid_file', 400);
         return $this->error('Invalid file type. Please upload a CSV file.', 'invalid_file');
      }
      // Get and parse options