MailOdds

WooCommerce + MailOdds

Connect your WooCommerce store to MailOdds. Validate checkout emails, sync products, send transactional email, and attribute revenue to email campaigns.

Setup time: 5-10 min
Difficulty: Beginner
1,000 free validations included

Prerequisites

  • MailOdds account with API key
  • WooCommerce store with REST API enabled
  • WooCommerce REST API consumer key and secret

E-commerce Use Cases

Checkout Email Validation

Validate emails at WooCommerce checkout before order processing. Catch disposable and invalid addresses early.

Store Connection + Product Sync

Sync your WooCommerce product catalog for campaign personalization and product recommendation emails.

Transactional Email

Send order confirmations and shipping notifications through MailOdds with open and click tracking.

Revenue Attribution

Track which email campaigns drive purchases with conversion tracking via the mid parameter.

Store Connection

Connect your WooCommerce store to MailOdds using the PHP SDK. Provide your store domain and WooCommerce REST API credentials to enable product sync, event tracking, and revenue attribution.

Connect WooCommerce Store

PHP
use MailOdds\Client;

$client = new Client('YOUR_API_KEY');

$store = $client->stores->connect([
    'platform' => 'woocommerce',
    'shop_domain' => 'your-store.com',
    'consumer_key' => 'ck_...',
    'consumer_secret' => 'cs_...'
]);

// Trigger product catalog sync
$client->stores->sync($store->id);

Related: E-commerce Email Integration

Product Sync

Import your WooCommerce product catalog into MailOdds. Use synced products for personalized campaign content, abandoned cart templates, and product recommendation emails.

Query Synced Products

PHP
// Query synced products for campaign personalization
$products = $client->storeProducts->list([
    'store_id' => $storeId,
    'limit' => 20
]);

foreach ($products->data as $product) {
    echo $product->title;
    echo $product->price;
    echo $product->image_url;
}

Related: E-commerce Email Integration

Order Confirmation Email

Send transactional order emails through MailOdds with open and click tracking. Tag messages for filtering and analytics.

Send Order Confirmation

PHP
// Send order confirmation via MailOdds
$result = $client->deliver([
    'from' => 'orders@your-store.com',
    'to' => $order->get_billing_email(),
    'subject' => 'Order #' . $order->get_order_number() . ' confirmed',
    'html' => $orderConfirmationHtml,
    'tags' => ['order-confirmation', 'woocommerce'],
    'track_opens' => true,
    'track_clicks' => true
]);

Commerce Event Tracking

Track storefront events from your WooCommerce theme to attribute revenue back to email campaigns. The mid parameter from email click-throughs closes the attribution loop when an order completes.

Track Storefront Events

JAVASCRIPT
// Track WooCommerce events for revenue attribution
// Add to your theme's footer or use the MailOdds pixel

fetch('https://api.mailodds.com/v1/events/track', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    event_type: 'purchase',
    email: customerEmail,
    idempotency_key: 'order_' + orderId,
    properties: {
      order_id: orderId,
      value: orderTotal,
      currency: 'EUR',
      mid: new URLSearchParams(window.location.search).get('mid')
    }
  })
});

Related: E-commerce Email

Campaign with Product Personalization

Create and send campaigns that include product recommendations from your synced WooCommerce catalog. Track opens, clicks, and revenue attribution in one workflow.

Create and Send Campaign

PHP
// Create campaign with WooCommerce product recommendations
$campaign = $client->campaigns->create([
    'name' => 'New Arrivals',
    'subject' => 'Fresh picks from our store',
    'from_email' => 'hello@your-store.com',
    'subscriber_list_id' => $listId,
    'html_body' => $productEmailHtml,
    'track_opens' => true,
    'track_clicks' => true
]);

$client->campaigns->send($campaign->id);

Related: Email Campaigns

Checkout Email Validation

The MailOdds WordPress plugin handles WooCommerce checkout validation natively. It validates billing emails before order processing with fail-open timeout and transient caching. No custom code required.

Zero-Config Sending Domain Authentication

WooCommerce merchants sending via MailOdds get automatic email authentication. Add one NS record for mo.yourdomain.com and MailOdds manages SPF, DKIM, MX, and DMARC automatically. No ongoing DNS maintenance.

Frequently Asked Questions

Troubleshooting

Need more help?

Can't find what you're looking for? We're here to help you get WooCommerce working.

Connect Your WooCommerce Store

Validate checkout emails, sync products, and track revenue attribution. Free tier available.