'POST', 'callback' => [ AuthController::class, 'login' ], 'permission_callback' => '__return_true', ] ); register_rest_route( $namespace, '/auth/logout', [ 'methods' => 'POST', 'callback' => [ AuthController::class, 'logout' ], 'permission_callback' => '__return_true', ] ); register_rest_route( $namespace, '/auth/check', [ 'methods' => 'GET', 'callback' => [ AuthController::class, 'check' ], 'permission_callback' => '__return_true', ] ); // Defer to controllers to register their endpoints CheckoutController::register(); OrdersController::register(); AnalyticsController::register_routes(); // Payments controller $payments_controller = new PaymentsController(); $payments_controller->register_routes(); }); } }