Integrations
Integrating AcelleMail with WordPress and WooCommerce
Overview
Connect AcelleMail with WordPress to automatically sync subscribers and trigger automations based on user actions.
WordPress Integration
Method 1: API Integration (Recommended)
Add subscribers when they register on your WordPress site:
// functions.php or custom plugin
add_action('user_register', function($user_id) {
$user = get_user_by('id', $user_id);
wp_remote_post('https://your-acellemail.com/api/v1/lists/LIST_UID/subscribers', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_TOKEN',
'Content-Type' => 'application/json',
],
'body' => json_encode([
'EMAIL' => $user->user_email,
'FIRST_NAME' => $user->first_name,
'LAST_NAME' => $user->last_name,
]),
]);
});
Method 2: Signup Form Embed
Embed AcelleMail's signup form on your WordPress site:
- Create a form in AcelleMail → Forms → Create
- Copy the embed code
- Paste into a WordPress HTML block or widget
WooCommerce Integration
Sync Customers on Purchase
add_action('woocommerce_thankyou', function($order_id) {
$order = wc_get_order($order_id);
wp_remote_post('https://your-acellemail.com/api/v1/lists/LIST_UID/subscribers', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_TOKEN',
'Content-Type' => 'application/json',
],
'body' => json_encode([
'EMAIL' => $order->get_billing_email(),
'FIRST_NAME' => $order->get_billing_first_name(),
'LAST_NAME' => $order->get_billing_last_name(),
'tag' => 'woocommerce-customer,purchased',
'ORDER_TOTAL' => $order->get_total(),
]),
]);
});
Automated Flows
After integration, set up automations in AcelleMail:
- Post-purchase follow-up: Thank you + review request
- Abandoned cart: Reminder emails (requires cart tracking plugin)
- Win-back: Re-engage customers who haven't purchased in 90 days
- Product recommendations: Based on purchase history tags
Webhook for Real-Time Sync
Configure AcelleMail webhooks to update WordPress when subscribers change:
// REST API endpoint in WordPress
add_action('rest_api_init', function() {
register_rest_route('acellemail/v1', '/webhook', [
'methods' => 'POST',
'callback' => function($request) {
$event = $request->get_param('event');
$email = $request->get_param('data')['email'];
if ($event === 'subscriber.removed') {
// Handle unsubscribe in WordPress
}
return new WP_REST_Response('OK', 200);
},
]);
});