Connect WordPress events to external services via outgoing webhooks. Supports Slack, Discord, n8n, Make.com, and any custom API — with 12 trigger events, merge tags, connector templates, delivery logging, test & retry, and WooCommerce support.
When something happens in WordPress (post published, user registered, order placed), this plugin automatically sends that data to any external service via HTTP webhook — no code required.
WordPress Event → Webhook Rule → HTTP POST → External Service
(Slack, n8n, Discord, Make.com, any API)
| Feature | Description |
|---|---|
| 📋 Rules Manager | Create, edit, enable/disable, and delete webhook rules |
| ⚡ 12 Trigger Events | Posts, users, comments, WooCommerce orders, and custom hooks |
| 🏷️ Merge Tags | 30+ dynamic placeholders replaced with real data at runtime |
| 🔗 Connector Templates | One-click pre-fill for Slack, Discord, n8n, Make.com |
| 📝 Custom Headers | Add API keys, auth tokens, or any custom HTTP headers |
| 🚀 Test Webhook | One-click test with sample data — instant feedback |
| 📊 Delivery Log | Full history with status, response codes, duration, and details |
| 🔄 Retry Failed | One-click retry for failed deliveries |
| 🛒 WooCommerce | Order placed, status changed, low stock (auto-detected) |
| 🎯 Custom Hooks | Enter ANY WordPress action hook name as a trigger |
| Category | Events |
|---|---|
| Posts | Published, Updated, Trashed |
| Users | Registered, Login, Failed Login |
| Comments | New Comment Posted |
| WooCommerce | Order Placed, Order Status Changed, Product Low Stock |
| Custom | Any WordPress action hook |
| Platform | What Gets Pre-filled |
|---|---|
| 💬 Slack | Slack Block Kit payload with sections and context |
| 🎮 Discord | Discord embed with title, description, color, footer |
| ⚡ n8n | Clean structured JSON for n8n webhook triggers |
| 🔧 Make.com | Make.com compatible webhook payload |
| 📝 Custom | Blank template for any API |
wp-webhook-connector/
├── wp-webhook-connector.php # Main plugin bootstrap
├── includes/
│ ├── class-database.php # Custom tables (rules + logs)
│ ├── class-merge-tags.php # 30+ dynamic placeholders
│ ├── class-admin-page.php # Rules list + stat cards
│ ├── class-rule-editor.php # Add/edit form + connector templates
│ ├── class-dispatcher.php # Event hooks + HTTP dispatch
│ ├── class-delivery-log.php # WP_List_Table log viewer
│ └── class-ajax-handler.php # Test, toggle, retry via AJAX
├── assets/
│ ├── css/admin.css # Admin styles
│ └── js/admin.js # UI interactions
├── .gitignore
└── README.md
cd wp-content/plugins/
git clone https://github.com/sharanvijaydev/wp-webhook-connector.git- Activate in Plugins → Installed Plugins
- Navigate to Webhooks in the admin sidebar
- Click Add New Rule to create your first webhook
- Add New Rule → Name: "Notify Slack on new post"
- Quick Setup → Select "Slack" (pre-fills payload)
- Trigger → Post Published
- URL → Paste your Slack incoming webhook URL
- Save → Click "Send Test Webhook" to verify
- Done! Every new post now notifies your Slack channel.
| Version | Feature |
|---|---|
| v1.1 | Conditional logic (only if category = "News") |
| v1.2 | Response parsing and follow-up actions |
| v1.3 | Incoming webhooks (receive data INTO WordPress) |
| v2.0 | Visual workflow builder |
- Two custom database tables — rules and delivery logs, created via
dbDelta() - Dynamic hook registration — reads active rules and registers WordPress hooks at runtime
- Context-aware dispatch — collects relevant data based on which event triggered
- WooCommerce conditional loading — WC hooks only register if WooCommerce is active
- Merge tag engine — string replacement with automatic cleanup of unreplaced tags
- AJAX-powered UI — test, toggle, retry without page reloads
- Detail modal — inspect request/response payloads with JSON pretty-printing
- Security — nonce verification, capability checks, prepared SQL statements
- Zero dependencies — pure PHP + vanilla JS, no build tools
- All admin pages require
manage_optionscapability - AJAX requests verified with
check_ajax_referer() - All database queries use
$wpdb->prepare() - Form submissions protected with
wp_nonce_field()/wp_verify_nonce() - Input sanitized with
sanitize_text_field(),sanitize_key(),esc_url_raw() - Output escaped with
esc_html(),esc_attr(),esc_url()
R Saravanan
- LinkedIn: linkedin.com/in/sharanvijay
- Email: sharanvijay.r@gmail.com
- Portfolio: thozhilnutpamtech.com
GPL-2.0+ — See LICENSE