Skip to content

CF7 to API v2.1.0

Choose a tag to compare

@github-actions github-actions released this 26 Jan 17:08
· 71 commits to main since this release
Immutable release. Only release title and notes can be modified.

Added

  • Granular Alert Preferences: Per-submission failure alerts with granular control

    • New alert_types setting structure with threshold and individual options
    • maybe_send_individual_alert() triggers when a submission permanently fails after all retries
    • Individual alerts are event-driven (no cooldown) vs rate-limited threshold alerts
    • Privacy-first design: alert emails contain only error metadata (form name, endpoint, timestamp, response code, error message) - never user-submitted form data
    • Spam prevention: transient flag per log_id prevents duplicate alerts on retry
    • UI: "Alert Types" section with nested checkboxes for threshold and individual alerts
    • Threshold settings reorganized under clear subheading
    • Backward compatible: threshold alerts enabled by default, individual disabled
    • Integrated in LogsController::handle_retry_action() for retry exhaustion and max limit scenarios
  • Response Action Hook (cf7_api_after_response): New filter hook for extending plugin functionality

    • Fires after each API response is received (success or failure)
    • Provides complete response data (status code, headers, body, parsed JSON, duration)
    • Includes submission context (log ID, form ID, form title, form data, endpoint, retry info)
    • Enables developers to:
      • Store CRM lead IDs returned by APIs
      • Trigger notifications based on response content
      • Log to external monitoring services (Sentry, Bugsnag, etc.)
      • Send data to secondary endpoints (multi-endpoint support)
    • Hook only fires for HTTP responses (not WP_Error cases)
    • Minimal overhead when no callbacks are registered
    • See docs/API_REFERENCE.md for complete documentation and examples
  • Form Filter Dropdown: Visible dropdown selector to filter logs by Contact Form 7 form

    • Dropdown appears in filter controls between Status and Date filters
    • Lists all forms that have at least one log entry
    • Shows "All Forms" default option to display logs from all forms
    • Gracefully handles deleted forms (displays as "Form #123")
    • Auto-submits on selection for immediate filtering (no button click needed)
    • Active filter tag shows selected form with individual remove capability
    • Filter persists across pagination and combines with status/date filters
    • Alphabetically ordered by form title for easy navigation
    • New LogReader::get_forms_with_logs() method retrieves distinct forms with logs
    • Comprehensive unit test coverage (6 tests for all scenarios)