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

# Connect WooCommerce

> Install the Retainful plugin on your WordPress site and link your WooCommerce store.

WooCommerce connects to Retainful through a WordPress plugin. The plugin watches your store for events — new orders, started checkouts, product views — and sends them to Retainful in real time.

## Requirements

* WordPress with **WooCommerce active**.
* The **Retainful plugin** (version 3.0 or later).
* Your site must be reachable from the internet (for the connection handshake).

## Install and connect

<Steps>
  <Step title="Install the plugin">
    In your WordPress admin, go to **Plugins → Add New**, search for **Retainful**, install and activate it.
  </Step>

  <Step title="Start the connection from Retainful">
    In Retainful, go to **Integrations → WooCommerce**, enter your store URL (for example `https://mystore.com`), and click **Connect**.
  </Step>

  <Step title="Approve in WordPress">
    You'll be redirected to your WordPress admin to approve the connection. Once you approve, the plugin registers itself with Retainful and sets up event delivery automatically.
  </Step>

  <Step title="Wait for the first sync">
    Retainful imports your products, customers, and order history. Progress depends on store size.
  </Step>
</Steps>

<Check>
  The Integrations page shows your store as **Connected**, and new orders start appearing in contact timelines within a minute or two of being placed.
</Check>

## What the plugin tracks

| Event                           | Used for                                       |
| ------------------------------- | ---------------------------------------------- |
| Checkout started                | Abandoned cart recovery                        |
| Order placed / paid / fulfilled | Post-purchase automations, revenue attribution |
| Order cancelled / refunded      | Keeping reports accurate                       |
| Product created / updated       | Product blocks in emails                       |
| Product viewed                  | Browse-based targeting                         |
| Back in stock / out of stock    | Back-in-stock automations                      |

## Staging sites and password-protected stores

If your store sits behind HTTP basic authentication (common on staging sites), the connection check will fail. Go to **Integrations → WooCommerce → Advanced Auth** and enter the username and password so Retainful can reach your site.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Connection check fails immediately">
    Make sure the Retainful plugin is **activated** and WooCommerce is running. The connection check verifies both before starting.
  </Accordion>

  <Accordion title="Cloudflare blocks the connection">
    If your site uses Cloudflare with **Bot Fight Mode** enabled, it can block Retainful's connection request. Temporarily disable Bot Fight Mode (or add an exception) while connecting, then re-enable it.
  </Accordion>

  <Accordion title="Orders aren't appearing in Retainful">
    Check that your site's WordPress cron is running — some hosts disable it. Also confirm the store still shows as **Connected** in Retainful; if not, reconnect from the Integrations page.
  </Accordion>

  <Accordion title="Discount codes aren't being created">
    Coupons are created in your store by the plugin. Confirm the plugin is up to date and the store connection is healthy, then test the automation again.
  </Accordion>
</AccordionGroup>

## Disconnecting

Go to **Integrations → WooCommerce → Disconnect** in Retainful, or deactivate the plugin in WordPress. Tracking stops immediately; your existing data stays in Retainful.
