From e1768a075a3e9278bdab0f5332259822d2c5b918 Mon Sep 17 00:00:00 2001 From: dwindown Date: Sun, 16 Nov 2025 10:29:36 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20Correct=20namespace=20case=20in=20Routes?= =?UTF-8?q?.php=20(API=20=E2=86=92=20Api)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🐛 Problem: - 500 errors on all API endpoints - Class "WooNooWAPIPaymentsController" not found - Namespace inconsistency: API vs Api ✅ Solution: - Fixed use statements in Routes.php - Changed WooNooW\API\ to WooNooW\Api\ - Affects: PaymentsController, StoreController, DeveloperController, SystemController 📝 PSR-4 Autoloading: - Namespace must match directory structure exactly - Directory: includes/Api/ (lowercase 'i') - Namespace: WooNooW\Api\ (lowercase 'i') 🎯 Result: - All API endpoints now work correctly - No more class not found errors --- includes/Api/Routes.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/Api/Routes.php b/includes/Api/Routes.php index 2f3e638..d902f4d 100644 --- a/includes/Api/Routes.php +++ b/includes/Api/Routes.php @@ -7,14 +7,14 @@ use WooNooW\Api\CheckoutController; use WooNooW\Api\OrdersController; use WooNooW\Api\AnalyticsController; use WooNooW\Api\AuthController; -use WooNooW\API\PaymentsController; -use WooNooW\API\StoreController; +use WooNooW\Api\PaymentsController; +use WooNooW\Api\StoreController; use WooNooW\Api\ShippingController; use WooNooW\Api\TaxController; use WooNooW\Api\PickupLocationsController; use WooNooW\Api\EmailController; -use WooNooW\API\DeveloperController; -use WooNooW\API\SystemController; +use WooNooW\Api\DeveloperController; +use WooNooW\Api\SystemController; use WooNooW\Api\NotificationsController; use WooNooW\Api\ActivityLogController;