> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailbreeze.com/llms.txt
> Use this file to discover all available pages before exploring further.

# WordPress

> Connect your WordPress site to MailBreeze for seamless email marketing automation

## Overview

The MailBreeze WordPress plugin provides one-click integration between your WordPress or WooCommerce site and MailBreeze. Once connected, customer data, orders, and form submissions flow automatically—no webhooks to configure, no fields to map.

## Requirements

* WordPress 6.0 or higher
* PHP 8.0 or higher
* WooCommerce 8.0+ (optional, for e-commerce features)

## Installation

<Steps>
  <Step title="Download the plugin">
    Download the latest version from [WordPress.org](https://wordpress.org/plugins/mailbreeze/) or get it directly:

    [Download MailBreeze for WordPress](https://downloads.mailbreeze.com/mailbreeze-1.0.0.zip)
  </Step>

  <Step title="Install in WordPress">
    Go to **Plugins > Add New > Upload Plugin** and select the downloaded ZIP file.

    Or search for "MailBreeze" in the WordPress plugin directory.
  </Step>

  <Step title="Activate">
    Click **Activate** after installation completes.
  </Step>

  <Step title="Connect to MailBreeze">
    Navigate to **Settings > MailBreeze**, enter your API key, and click **Connect**.
  </Step>
</Steps>

## Get Your API Key

1. Log in to [console.mailbreeze.com](https://console.mailbreeze.com)
2. Go to **Settings > Integrations**
3. Click **Generate API Key** for WordPress
4. Copy the key and paste it in your WordPress settings

<Warning>
  Keep your API key secret. If you suspect it has been compromised, regenerate it immediately from the MailBreeze dashboard.
</Warning>

## Features

### WooCommerce Integration

When WooCommerce is active and enabled in your MailBreeze dashboard:

| Event                | What Happens                        |
| -------------------- | ----------------------------------- |
| Customer created     | Contact synced to MailBreeze        |
| Customer updated     | Contact updated in MailBreeze       |
| Order placed         | Order event triggers automations    |
| Order status changed | Status change triggers automations  |
| Guest checkout       | Email captured from billing details |

<Note>
  The plugin is fully compatible with WooCommerce HPOS (High-Performance Order Storage).
</Note>

### Form Integrations

Capture leads from all major WordPress form plugins:

<CardGroup cols={2}>
  <Card title="Contact Form 7" icon="wpforms">
    5M+ active installations
  </Card>

  <Card title="WPForms" icon="wpforms">
    6M+ active installations
  </Card>

  <Card title="Gravity Forms" icon="square-poll-vertical">
    Premium form builder
  </Card>

  <Card title="Elementor Forms" icon="elementor">
    Part of Elementor Pro
  </Card>

  <Card title="Fluent Forms" icon="wpforms">
    Fast and lightweight
  </Card>

  <Card title="Ninja Forms" icon="wpforms">
    Drag and drop builder
  </Card>

  <Card title="Formidable Forms" icon="wpforms">
    Advanced form builder
  </Card>

  <Card title="Forminator" icon="wpforms">
    Free WPMU DEV plugin
  </Card>
</CardGroup>

Email, name, and phone fields are **auto-detected**—no manual field mapping required.

## Dashboard Controls

Integrations are enabled and disabled from your **MailBreeze dashboard**, not WordPress. This allows you to:

* Enable/disable WooCommerce sync
* Enable/disable individual form plugins
* Control what data flows to MailBreeze

Go to **Settings > Integrations > WordPress** in your MailBreeze dashboard to manage these settings.

## Troubleshooting

### Enable Debug Logging

1. Go to **Settings > MailBreeze** in WordPress
2. Toggle **Enable Debug Logging**
3. Reproduce the issue
4. View logs in the **Debug Log** section

Logs are written to `wp-content/mailbreeze-debug.log`.

### Common Issues

<AccordionGroup>
  <Accordion title="Plugin shows 'Disconnected' after connecting">
    * Verify your API key is correct
    * Check that your server can reach `api.mailbreeze.com`
    * Look for errors in the debug log
  </Accordion>

  <Accordion title="Form submissions not syncing">
    * Ensure the form plugin is enabled in your MailBreeze dashboard
    * Verify the form has an email field
    * Check that the plugin is connected (green status)
  </Accordion>

  <Accordion title="WooCommerce orders not appearing">
    * Confirm WooCommerce integration is enabled in MailBreeze dashboard
    * Check that "Sync Order Events" is enabled
    * Verify the order status changed (pending → processing, etc.)
  </Accordion>
</AccordionGroup>

## Developer Hooks

Customize the plugin behavior with WordPress filters:

```php theme={null}
// Modify payload before sending to MailBreeze
add_filter('mailbreeze_transform_payload', function($payload, $event_type) {
    // Add custom data
    $payload['custom_field'] = 'value';
    return $payload;
}, 10, 2);

// Conditionally prevent webhook sending
add_filter('mailbreeze_should_send_webhook', function($should_send, $event_type, $payload) {
    // Don't sync test orders
    if ($event_type === 'order.created' && str_contains($payload['email'], '@test.com')) {
        return false;
    }
    return $should_send;
}, 10, 3);
```

## Uninstalling

When you delete the plugin (not just deactivate), all plugin data is removed:

* API key and connection settings
* Debug logs
* Scheduled background tasks

<Warning>
  Deactivating the plugin preserves your settings. Deleting it removes everything.
</Warning>

## Support

Need help? Contact us at [support@mailbreeze.com](mailto:support@mailbreeze.com) or check the [WordPress.org support forum](https://wordpress.org/support/plugin/mailbreeze/).
