post('/webhooks/chatwoot', [ChatwootWebhookHandler::class, 'handle']); // Tools (called by Flowise or external) $router->post('/tools/new_ticket', [NewTicketHandler::class, 'handle']); $router->post('/tools/get_order_data', [WooToolsHandler::class, 'getOrderData']); $router->post('/tools/get_product_data', [WooToolsHandler::class, 'getProductData']); $router->post('/tools/get_shipping_data', [WooToolsHandler::class, 'getShippingData']); $router->post('/tools/get_payment_methods', [WooToolsHandler::class, 'getPaymentMethods']); $router->post('/tools/get_product_compatibility', [WooToolsHandler::class, 'getProductCompatibility']); $router->post('/tools/get_car_data', [WooToolsHandler::class, 'getCarData']); // ── Dispatch ─────────────────────────────────────────────────────── $method = $_SERVER['REQUEST_METHOD'] ?? 'GET'; $uri = $_SERVER['REQUEST_URI'] ?? '/'; Logger::info('Request received', ['method' => $method, 'uri' => $uri]); $router->dispatch($method, $uri);