From 34a3326bdd5940e665fbe5042ebbf24e969a1743 Mon Sep 17 00:00:00 2001 From: Jordan Date: Sat, 21 Mar 2026 10:12:15 +0000 Subject: [PATCH] Adding testing hooks --- docs/hooks-and-api.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/hooks-and-api.md b/docs/hooks-and-api.md index cad9873..99f105d 100644 --- a/docs/hooks-and-api.md +++ b/docs/hooks-and-api.md @@ -4,6 +4,16 @@ Hooks are PHP files in the `hooks/` directory that execute server-side logic. They can also live inside a module at `template/estandar/modulos//hook.php`. +### Testing Hooks + +To test hooks, the site's Docker container must be running. Make a curl request to the Docker URL with the hook path. For example, if a hook is located at `hooks/example_hook/`: + +```bash +curl http://{DOCKER_URL_AND_PORT}/hooks/example_hook/ +``` + +Replace `{DOCKER_URL_AND_PORT}` with your local Docker address (e.g., `localhost:8080`). + ### How to Call Hooks **From Twig:**