How to connect WordPress memberships to Slack
WordPress does not have a universal membership-to-Slack connection. You need a membership plugin that supports Slack or webhooks, or custom code that sends membership events to a Slack incoming webhook. Use an add-on for the quickest setup.
- 01Choose the events and channel
- 02Create a Slack webhook
- 03Connect the membership events
- 04Format and protect the message
- 05Test every membership state
- 06Use an add-on for the fast route
What you need
- A WordPress membership plugin with event hooks or integration support
- Administrator access to WordPress
- A Slack workspace where you can install an app or create an incoming webhook
- A private Slack channel for membership alerts
Choose the events and channel
Decide which events should reach Slack before connecting anything. Typical choices are a successful sign-up, a membership level change, a cancellation and an expired membership. Send them to a private operations channel rather than a general chat channel.
Keep personal data out of the message where possible. A member name, level and event type may be enough; do not send passwords, payment details or unnecessary billing information.
Create a Slack webhook
In Slack, create an app or use the incoming-webhook setup, choose the workspace and select the channel that should receive the alerts. Slack gives you a unique webhook URL that accepts a message payload. Treat that URL like a password and do not paste it into a public support ticket or commit it to a public repository.
If Slack will not let you install the app, ask a workspace administrator to approve it. A webhook normally posts to its configured channel, so create separate webhooks when different teams need different alerts.
Connect the membership events
For a manual connection, use your membership plugin's documented action or webhook for each event and send a server-side POST request to the Slack webhook URL. The request should contain a short text message or Slack-formatted blocks. Do not put the webhook URL in browser-side JavaScript.
For Paid Memberships Pro, the documented pmpro_after_checkout event can run code after checkout, while pmpro_after_change_membership_level runs after a membership level is changed or cancelled. The pmpro_added_order event is also available after an order is added. Use the event that matches the business action you want to report, rather than firing a message from a confirmation-page visit.
Format and protect the message
Build a message such as New membership — Jane Smith joined Gold. Include the membership level and site name, and add an order or user reference only if your team needs it. Escape user-supplied text before placing it in Slack formatting.
Store the webhook URL in a protected configuration value or environment variable when possible. If you add custom code, place it in a small site-specific plugin or a code-management tool rather than editing a parent theme or a membership plugin file.
Test every membership state
Run a test sign-up, level change and cancellation, then confirm that each expected message arrives in the correct channel. Test both free and paid levels if your site has both. For recurring memberships, also check what happens when a payment fails or a subscription expires; those may be separate events from a user-initiated cancellation.
The common Friday failure is a duplicate alert: checkout code can run again during a gateway callback, retry or page refresh. Record the order or event identifier and ignore it if the same event has already been sent. Also check your membership plugin's logs and Slack's response when a message does not arrive.
Use an add-on for the fast route
For a Paid Memberships Pro site, install its Slack Integration add-on from the WordPress admin, activate it, create the Slack incoming webhook, then open Settings > PMPro Slack. Paste the webhook URL, select the membership levels that should generate notifications and save the settings. The official setup requires Paid Memberships Pro to be active and documents checkout notifications.
This is the fast choice when your team mainly needs membership checkout alerts and does not want to maintain custom code. If cancellations, expirations or highly customised messages are essential, confirm that the add-on version covers those events; otherwise use the documented membership hooks or an automation service.
Let Paid Memberships Pro do it
Routes membership sign-up and cancellation alerts to Slack; choose it for team notifications rather than member-facing features.
Sources
- api.slack.com /incoming-webhooks?utm_source=openai
- paidmembershipspro.com /hooks-filters/?utm_source=openai
- paidmembershipspro.com /add-ons/pmpro-slack-integration/?utm_source=openai
Questions
- Can WordPress connect to Slack without a plugin?
- Yes, but only if your membership system exposes a webhook or developer hooks. You must create a Slack incoming webhook, write server-side code that listens for membership events and send a message to Slack. WordPress itself has no universal membership event system, so the exact code depends on the membership plugin and its checkout, level-change and cancellation events.
- How do I send membership cancellations to Slack?
- Send the cancellation event from your membership plugin to the same Slack webhook used for sign-ups. In Paid Memberships Pro, the documented membership-level change action runs after a level is changed or cancelled, so custom code can check whether the new state is cancelled and post an alert. Test scheduled expirations separately because they may follow a different event path.
- Why are Slack membership alerts duplicated?
- Duplicate Slack alerts usually happen because the same checkout or gateway callback is processed more than once. Do not trigger the message from a confirmation-page load alone. Instead, use a server-side event, save the order or event identifier after sending, and skip the notification when that identifier has already been handled.
- Is a Slack webhook safe to store in WordPress?
- A Slack webhook is safe only when it is kept private and used server-side. Do not expose it in page source, JavaScript, screenshots or public code. Restrict access to administrators, rotate the webhook if it leaks and avoid putting member passwords, payment data or unnecessary personal information into Slack messages.
- Should I use an add-on or custom code for this integration?
- Use an add-on when you need standard sign-up notifications and a short setup. Use custom code when you need cancellations, expirations, payment-failure alerts, different messages by membership level or deduplication rules that the add-on does not provide. The add-on saves maintenance, but custom code gives you control over the exact events and data sent.