Convoca Core
Core utilities for Convoca plugins
by Jose Carlos Nieto Ramos · github.com/josecarlosnieto91/convoca-core · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/josecarlosnieto91/convoca-core/archive/refs/heads/main.zipConvoca Core Utilities
Plugin base del ecosistema Convoca. Proporciona utilidades compartidas, logging centralizado, webhooks, dashboard, backup/restore, y gestión de capacidades.
Requirements
- WordPress 6.4+
- PHP 8.1+
Main Features
- DNI/NIE validation
- Centralized Logger with rotation
- Webhook manager with retries + dedup
- Atomic lock system
- Rate limiter
- Unified Dashboard (Convoca > Panel)
- Centralized Log Viewer (Convoca > Logs)
- Setup Wizard (Convoca > Asistente)
- Backup/Restore (Convoca > Backup)
- System Health (Convoca > Salud)
- Upgrade Manager
- REST API
📖 Documentación
La documentación completa (manual de usuario, API REST, hooks, instalación) vive en la wiki:
Dependencies
WordPress 6.4+, PHP 8.1+
Webhook Manager
Register and manage webhooks from Convoca > Webhooks.
Available events
| Event | Description |
|---|---|
member.created |
New member registered |
member.activated |
Member activated |
member.suspended |
Member suspended |
member.expired |
Membership expired |
member.renewed |
Membership renewed |
payment.completed |
Payment completed |
payment.failed |
Payment failed |
payment.reminder_sent |
Payment reminder sent |
enrollment.created |
New inscription |
enrollment.cancelled |
Inscription cancelled |
enrollment.checkin |
Check-in performed |
volunteer.hours_logged |
Volunteer hours logged |
volunteer.hours_approved |
Volunteer hours approved |
HMAC signature
If a secret is configured, each request includes X-Convoca-Signature header
with hash_hmac('sha256', $body, $secret). Verify on your endpoint:
$computed = hash_hmac('sha256', file_get_contents('php://input'), $secret);
if (hash_equals($computed, $_SERVER['HTTP_X_CONVOCA_SIGNATURE'])) {
// valid
}
Delivery
- Blocking mode, 15s timeout.
- Deduplication via transient (10s TTL, md5 payload hash).
- Each delivery gets a unique
X-Convoca-DeliveryUUID. - Retries with exponential backoff: 60s, 120s, 240s (max 3 attempts).
- Delivery logs: last 50 entries per webhook.
Testing
Click "Test" on any webhook to send a test.ping event. The delivery is
logged identically to real events.
Gestión de Plantillas PDF
Administra las plantillas desde Ajustes > Plantillas PDF.
Plantillas disponibles
| Clave | Descripción |
|---|---|
acuerdo_incorporacion |
Acuerdo de Incorporación |
anexo_voluntariado |
Anexo de Voluntariado |
certificado |
Certificado de voluntariado |
desvinculacion |
Acuerdo de Desvinculación |
Uso
- Cada plantilla es HTML puro con placeholders
{{nombre}},{{dni}},{{fecha}}, etc. (varían según el documento). - Puedes editarlas directamente desde el panel de administración y ver los placeholders disponibles en cada una.
- Al guardar, se crea automáticamente un backup versionado (últimas 5 versiones).
- Si la plantilla se corrompe (HTML inválido), se restaura a los valores por defecto y se guarda una copia de seguridad.
- El sistema valida: tamaño máximo 500KB, profundidad DOM < 30, máximo 10 bloques `