WooCommerce
The native connector with signed webhooks, the checkout consent field, and the snippet that carries the link token all the way to the order.
On this page
WooCommerce is a native integration: the store signs every webhook with a secret this platform generates — you only paste it. Orders arrive with cryptographic verification, with no token in the URL.
The card is in the app, under «Ajustes → Integraciones → WooCommerce» (settings → integrations → WooCommerce).
Connecting
- On the WooCommerce card, press «Generar secreto» (generate secret) and copy it. It is shown only once.
- Copy the card’s webhook URL too.
- In your store: WooCommerce → Settings → Advanced → Webhooks → Add webhook.
- Any name · Status Active · Topic Order updated · Delivery URL = the URL you copied · Secret = the secret you copied · API v3.
- Save and place a test order. The card’s activity should reflect it within seconds.
- Optional: on the card, adjust the phone prefix (34 for Spain), the automatic tag, the checkout consent field and the statuses that count as paid.
The checkout consent field
The card’s «Campo de consentimiento del checkout» (checkout consent field) is the name of the order meta where your store keeps the checkbox (for example with Checkout Field Editor). That meta is what the platform reads as consent — and it is what decides the contact’s level.
| Situation | Basis recorded | Resulting opt-in | What they can receive |
|---|---|---|---|
| Meta configured and the checkbox ticked | checkbox | «Marketing» | Everything: campaigns, waves, order.paid automations and 1 templates. Lifts a previous opt-out (an explicit act by the customer). |
| Meta configured and the order carries it with a false value | — (no registration recorded) | Unchanged | The sale is only recorded if they were already a registered contact; if not, no profile is created. |
| Consent field EMPTY on the card — or configured but the order does not carry that meta | purchase | «No» | Only replies when the person writes. The order.paid automation is NOT sent. A previous opt-out is always respected. |
Linking the sale to the link that brought it
Optional, but it is the only way to attribute a sale whose phone number we do not recognise.
The links the platform sends append ?wtk=<token> to the destination URL. WooCommerce does not store it on its own: this snippet is needed in your store so that the token travels all the way to the order. With it, an order whose phone number we do not recognise can still be attributed to the contact who received the link (it shows as «vía enlace» — via link).
Paste it into your child theme’s functions.php, or into a snippets plugin:
// Konverda — vincula la venta con el enlace que la trajo.
add_action( 'init', function () {
if ( isset( $_GET['wtk'] ) && ! headers_sent() ) {
$wtk = substr( sanitize_text_field( wp_unslash( $_GET['wtk'] ) ), 0, 64 );
if ( $wtk !== '' ) {
setcookie( 'wtk', $wtk, time() + 30 * DAY_IN_SECONDS, COOKIEPATH ?: '/', COOKIE_DOMAIN, is_ssl(), true );
}
}
} );
add_action( 'woocommerce_checkout_create_order', function ( $order ) {
if ( ! empty( $_COOKIE['wtk'] ) ) {
$order->update_meta_data( 'wtk', substr( sanitize_text_field( wp_unslash( $_COOKIE['wtk'] ) ), 0, 64 ) );
}
}, 10, 1 );
Read next
- The marketing opt-in and «Añadir a marketing»
- Opt-outs and what the platform remembers
- Orders API (generic connection) — the route for everything that is not Woo.
Still stuck? Contact support