WP Manifestindependent plugin directory
manifest / developer / webhook-logger

Webhook Logger

A WordPress plugin to log incoming webhooks (URL, headers, body, and IP).

by stasionok · github.com/stasionok/webhook-logger

0stars
0forks

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/stasionok/webhook-logger/archive/refs/heads/main.zip

A WordPress plugin to log incoming webhooks (URL, headers, body, and IP). It supports multiple tracked URLs and provides a dedicated admin interface for viewing, filtering, and searching logs.

Description

Webhook Logger is designed for developers who need to debug or monitor incoming webhook requests sent to their WordPress site. It captures all request data without interrupting the original request flow, allowing other plugins to process the webhooks as usual.

Key Features:

  • Multiple URLs: Specify one or more URLs (or partial URLs) to monitor.
  • Full Data Capture: Logs request method, full URL, headers, raw body, and sender's IP.
  • Admin Interface: View logs directly in the WordPress dashboard with two tabs (Settings and Logs).
  • Filtering & Search: Easily find specific entries by filtering by URL or searching through body and headers.
  • Secure Storage: Logs are stored in a dedicated database table (wp_webhook_logs) and accessible only to administrators.

Installation

  1. Upload the webhook-logger folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Go to Webhook Logger menu in the sidebar.
  4. In the Settings tab, add the URLs you want to monitor (one per line).
  5. View captured requests in the Logs tab.

Frequently Asked Questions

How do I monitor specific endpoints?

In the Settings tab, you can enter partial paths or full URLs.

  • For example, entering /wc-api/ will log all WooCommerce API callbacks.
  • Entering my-custom-endpoint will log any request that contains this string in its URL.

Where are the logs stored?

Logs are stored in a custom database table named wp_webhook_logs (the prefix may vary depending on your WordPress configuration). This ensures that logs are not publicly accessible via the filesystem.

Requirements

  • PHP 7.3 or higher.
  • WordPress 6.2 or higher.

Changelog

1.2.0

  • Restructured plugin architecture.
  • Added "Refresh" button for logs table.
  • Updated PHP requirement to 7.3+.
  • Improved code standards.

1.1.0

  • Added support for multiple URLs.
  • Added filtering and search functionality.

1.0.0

  • Initial release.

License

GPLv3 - https://www.gnu.org/licenses/gpl-3.0.html