Skip to content

Feat: Add configurable webhook body/headers#144

Merged
nRamstedt merged 36 commits into
mainfrom
feat/webhook-params
Jun 15, 2026
Merged

Feat: Add configurable webhook body/headers#144
nRamstedt merged 36 commits into
mainfrom
feat/webhook-params

Conversation

@nRamstedt

@nRamstedt nRamstedt commented Jun 15, 2026

Copy link
Copy Markdown
Member

Extends the webhook handler to support configurable request body and headers. The configurable request body (JSON) allows placeholders ({{field}} / {{*}}) for field interpolation using dot-notation, example:

{
    "message": "{{message}}",
    "name": "{{user.name}}",
    "wants_feedback": "{{wants_feedback}}",
    "email": "{{email}}",
    "phone": "{{phone}}",
    "all": "{{*}}"
}

Placeholder values will match ACF field names or output all fields when using {{*}} .

Enable WP_DEBUG_LOG and set MODULARITY_FRONTEND_FORM_LOG_LEVEL to "debug" to output errors to the log.

Changes:

  • add helsingborg-stad/psr-logger package
  • add adbario/php-dot-notation package
  • add loggning decorators for handler and handler result
  • env vars: configure logger using "MODULARITY_FRONTEND_FORM_LOG_LEVEL" or "APP_LOG_LEVEL" (set to error, info, debug etc based on psr log levels)
  • add hydrator interface and implementation for field interpolation (depends on adbario/php-dot-notation)
  • add ACF field json validation for request body field
  • add loggning documentation to README.md

@nRamstedt nRamstedt changed the title Feat/webhook params Feat: Add configurable webhook body/headers Jun 15, 2026
@nRamstedt nRamstedt marked this pull request as ready for review June 15, 2026 13:31
@nRamstedt nRamstedt merged commit 0033513 into main Jun 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant