AI-generated WordPress plugin

Generate a WordPress plugin that sends Slack notifications on new orders

Slack has become the default inbox for operations. When a new order comes in, the sales team wants to know in their shared channel with enough context to act — customer name, total, products, a link to the order in admin. When a VIP customer places an order, maybe a different channel with a higher notification priority. When there are 50 orders in 5 minutes on Black Friday, grouped summaries instead of 50 individual pings.

A custom Slack plugin for WordPress handles this exactly the way your ops team thinks. We build it on Slack Incoming Webhooks (no OAuth app, no Slack bot to install), format messages with Slack Block Kit for rich layouts, and let you pick the channel per trigger type.

5 min to ZIP 24 h live sandbox WP Coding Standards

Why generate it instead of installing an existing plugin?

Generic Slack plugins for WooCommerce (free on wp.org) send a plain-text notification with basic order info. Good enough to prove the concept. As soon as you want Block Kit formatting, multiple channels, conditional routing ("orders over €500 go to #vip-sales"), throttling during spikes, or emoji reactions added from the server side, you hit their config limit.

Paid alternatives (Automator, WPNotif, or dedicated WooCommerce-to-Slack SaaS) fix most of it but cost a recurring fee. For a feature that is fundamentally "POST JSON to an HTTPS URL when something happens", a custom plugin is a €5 generation and zero recurring cost.

Slack also deprecates message formats and recommends Block Kit for anything non-trivial. A plugin designed for Block Kit from day one is cleaner than a plugin that shoehorns legacy attachments into new blocks.

Example prompt

This is the kind of description that generates this plugin. You can start from it and tweak whatever you need before hitting generate.

Plugin name: Acme Slack Notifier

Channels (each with its own Incoming Webhook URL):
- #new-orders: all orders on creation.
- #vip-sales: orders with total > 500 EUR or customer having user meta "vip=1".
- #ops-alerts: payment failures.

Trigger 1 — order created:
- When WC order moves to "processing" or "on-hold".
- Block Kit message with: customer name + email, order total in bold, list of items (sku + qty), a button linking to the order in wp-admin.

Trigger 2 — VIP order:
- Same message but in #vip-sales with a big :rocket: emoji at the top.

Trigger 3 — payment failed:
- When order moves to "failed" and has a gateway error message in meta.
- Short message in #ops-alerts with order ID, gateway, error code.

Throttle: during high-frequency periods (more than 10 orders in 60 seconds), switch to a summary message every 5 min instead of one-by-one.

Admin: settings page with the 3 webhook URLs, toggles per trigger, custom message template per trigger (supports {customer}, {total}, {items}).

HPOS-compatible. Uses wc_get_order and $order->get_meta throughout.

What the generated plugin typically includes

  • wp_remote_post to the Slack webhook URL with a 5s timeout
  • Block Kit JSON builder (proper structure, not strings concatenated)
  • Trigger hooks registered for each order status transition
  • Throttle using a transient counter (orders per minute) to switch to summary mode
  • Per-trigger enable/disable toggle + custom message template with token replacement
  • HPOS-compatible order reading
  • Admin page with a "test send" button to validate each webhook URL

Point the same plugin at Discord, Microsoft Teams or Telegram instead of Slack — the API shape changes but the plugin pattern stays.

Frequently asked questions

Do I need a Slack app or bot?

No. Incoming Webhooks only. You create one per channel in Slack → Apps → Incoming Webhooks, paste the URL in the plugin settings. Zero OAuth complexity.

Can I customise the message look?

Yes — the templates use tokens like {customer}, {total}, {items}, and the admin can tweak the Block Kit layout. For big changes, editing the template file in /templates/ takes a minute.

What about Slack rate limits?

Incoming Webhooks allow roughly 1 message/second per webhook. For higher volume the plugin auto-throttles into summary messages. For truly high volume (Black Friday), consider splitting across multiple webhooks.

Is it HPOS-safe?

Yes. We use wc_get_order and $order->get_meta exclusively; no get_post_meta on order IDs. The plugin declares custom_order_tables compatibility in before_woocommerce_init.

Ready to generate your plugin?

Create a free account, verify your email, first generation is on us.

Related:SlackWooCommerceNotificationsHPOS-ready