Skip to content
Features

WordPress & WooCommerce Setup

Step by step: let the chatbot answer order and delivery questions for your WooCommerce shoppers.

On this page

WordPress & WooCommerce Setup#

This guide connects a WooCommerce store so your chatbot can answer “where is my order?”. Signed-in shoppers see their own orders straight away; guests are asked for their order number and billing email. It takes about 15 minutes and needs no code — you install the Gydr WordPress plugin like any other.

Background: Identify signed-in visitors explains the three ways Gydr recognises a signed-in visitor, and Guests & data never to send lists what must stay out of it.

1. Connect WooCommerce in Gydr#

In the Console, open Plugins → WooCommerce Storefront. A short setup walks you through it. Enter your store URL (for example https://shop.example.com) and press Test connection — Gydr checks your store answers before you continue. On the next step you can keep the recommended product-search settings. Then attach the plugin to your widget’s Skill; the chatbot can now search your products. The prerequisites are on the Plugins & MCP page.

2. Authorize Gydr in WooCommerce#

  1. On the Order & delivery status step of the setup, press Authorize in WooCommerce. Your own store opens in a new tab and asks whether Gydr may read your orders.
  2. Press Approve. WooCommerce creates a read-only key by itself and sends it to Gydr — there is nothing to copy. Close that tab; back in Gydr the step finishes on its own, and continuing switches on order and delivery answers.
  3. Already connected your store? Open the plugin’s Orders tab instead, press Authorize in WooCommerce, approve, and switch on Answer order & delivery questions.

Read is all Gydr asks for — it can never change or cancel an order. If your store cannot reach Gydr (some hosts block outgoing requests), open Have a key already? Paste it instead: create a key under WooCommerce → Settings → Advanced → REST API → Add key (User: a Shop Manager or Administrator; Permissions: Read), paste both halves and press Check key. Either way Gydr checks the key against your store before it is saved. What that check can report:

Result
Accepted
What to do
Nothing — carry on.
Result
Rejected key
What to do
The key or secret is wrong or was revoked. Create a new key and paste both halves again.
Result
Key lacks read permission
What to do
Edit the key in WooCommerce and set Permissions to Read (or pick a user who can read orders).
Result
Host strips the Authorization header
What to do
Your web server removes the header before WordPress sees it. Add SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1 to your .htaccess, or ask your host to pass the Authorization header through.
Result
REST API unreachable
What to do
Gydr can’t reach /wp-json/. Check permalinks are not “Plain” and that no security plugin, firewall or Cloudflare rule blocks it.

3. Download and install the plugin#

In the Console, go to Settings → Signed-in visitors → Add sign-in source → WordPress or WooCommerce (the WooCommerce setup’s Recognise signed-in shoppers step opens the same panel in place). Type your store’s address and download the plugin (a zip file).

  1. Press Open your WordPress upload page in the Console (or go to Plugins → Add New → Upload Plugin), choose the zip file, press Install Now, then Activate.
  2. It appears in your plugin list as Gydr Widget - AI Chat.

4. Connect WordPress#

  1. Back in the Console panel, press Connect WordPress. Your site’s plugin page opens and asks “Connect this site to …?” — press Connect.
  2. You are taken to your dashboard to approve it. Check the site address is yours, pick the widget to show, and optionally tick Let the assistant look up orders (WooCommerce asks you to approve a read-only key once). Press Approve.
  3. You land back in WordPress with “Connected”. The chat widget now appears on your store. Nothing secret was copied: your site and your dashboard exchanged the connection directly.

Your WooCommerce plugin trusts this site automatically when you connect through the WooCommerce setup, and customers are matched by Subject (sub). You can check it on the plugin’s Signed-in customers tab or under Plugins that recognise signed-in customers in Settings. Without it, shoppers still get their order status by entering the order number and email.

If your host blocks outbound requests, the plugin says it couldn’t reach your dashboard. Open Have an older plugin? Paste a connection code instead in the Console panel, create a code (it is shown only once) and paste it on the plugin’s page under Have a connection code?. Paste it only into WordPress, never into a page or a code repository.

5. Check it works#

  1. Sign in to your store as a customer who has an order, open the chat and ask “where is my order?”. It should list your recent orders without asking anything.
  2. The Console panel turns to “Recognised a visitor on” the date, and your site’s row in Settings → Signed-in visitors says the same. If it doesn’t, see the troubleshooting table.
  3. Sign out and ask again. The conversation starts fresh, and the chatbot asks for an order number and billing email.

Updating the plugin#

WordPress shows Gydr plugin updates like any other plugin, under Dashboard → Updates or Plugins. You can switch on auto-updates for it from the Plugins list.

Why it is set up this way#

Choice
The token is fetched separately, never printed into the page
Reason
Page caches such as LiteSpeed Cache, WP Rocket and Cloudflare APO store whole pages. A token printed into the HTML would be served to the next visitor — with the first customer's orders, so the plugin never does that.
Choice
sub = the WordPress user id
Reason
A WooCommerce customer id IS the WordPress user id, so the plugin can find the shopper's orders directly.
Choice
email_verified: false
Reason
WordPress doesn't confirm that users own their email address, so Gydr must not match orders by it.
Choice
Guests use the form
Reason
A guest checkout has no account (customer id 0), so a guest proves an order is theirs with the order number and billing email instead.

What shoppers see#

  • Signed in: their 5 most recent orders, with tracking for the newest, without being asked anything. Asking about a specific order they own shows it. Another customer’s order number gets “no order with that number” — it never reveals that the order exists.
  • Guests: a short form asks for the order number and billing email. A wrong pair and a missing order get the same answer, and attempts are limited per email and per visitor.
  • Tracking comes from WooCommerce Shipment Tracking, Advanced Shipment Tracking (AST), or WooCommerce order fulfilments.

On WhatsApp, Messenger, Instagram and Telegram

Those channels know the person only by their messaging account, not your website sign-in, so shoppers there always use the order-number form.

The full plugin reference is in WooCommerce Storefront → Order Status & Delivery Tracking.