Skip to content
Website Integrations

How to Add a WooCommerce Chatbot With WPCode (and Keep It Working)

A practical guide to adding a WooCommerce chatbot: install the embed code with WPCode, avoid caching plugin conflicts, and train the bot on your shipping, returns and product policies.

On this page
  1. What does a WooCommerce chatbot actually do for your store?
  2. What do you need before you start?
  3. How do you add a WooCommerce chatbot with WPCode?
  4. Will caching plugins break your store chatbot?
  5. What store-policy knowledge should you upload?
  6. How do you stop a store chatbot from making things up?
  7. Which plan fits a WooCommerce chatbot?
  8. Next steps

Key takeaways

  • The simplest way to add a WooCommerce chatbot is to paste a one-line script tag into the site-wide footer using the free WPCode plugin.
  • After installing, clear every cache layer (plugin, host and CDN) and test in a private window on product, cart and checkout pages.
  • If the chat button doesn't appear, exclude the embed script from JavaScript delay, defer, combine and minify settings in your caching plugin.
  • Your store policies, such as shipping, returns, payments and sizing, are the most valuable knowledge to upload first.
  • A bot that answers only from your documents, with a clear fallback message, protects you from confident wrong answers about prices or policies.
  • You can start free with no card, and the 14-day Pro trial starts automatically with your first bot.

A WooCommerce chatbot answers shoppers' questions about shipping, returns, sizing and products right on your store, so fewer people leave confused or email you the same questions. The quickest way to add one is to upload your store policies to InstantKnowledgeBot, copy its one-line embed code, and paste it into your site footer with the free WPCode plugin. Then clear your caching plugin so visitors actually see the chat button.

This guide walks through each step, including the caching issues that trip up most WordPress stores and the policy content that makes a store chatbot genuinely useful.

What does a WooCommerce chatbot actually do for your store?

A good store chatbot handles the questions shoppers ask before and after they buy. Think "How long does shipping take to Canada?" or "Can I return a sale item?" These questions usually have clear answers buried in your policy pages.

Instead of making shoppers hunt for those pages, the bot pulls the answer from your documents and replies in plain language. That's helpful late at night, on weekends and during busy sales periods.

Here's what it does well:

  • Answers your WooCommerce FAQ around the clock, in your own words
  • Explains policies like returns, exchanges, warranties and shipping zones
  • Describes products using your size guides, care instructions and specs
  • Captures leads when a visitor shows buying intent (on Pro and Agency plans)
  • Shows you what shoppers ask through analytics on top questions and unanswered questions

What it doesn't do: look up individual orders or change your WooCommerce data. InstantKnowledgeBot answers only from the knowledge you upload. If you want a deeper comparison with human chat, read AI chatbot vs live chat.

What do you need before you start?

You only need a few things in place:

  1. A WordPress site running WooCommerce where you can install plugins (admin access).
  2. A free InstantKnowledgeBot account. No card is required.
  3. Your store documents. Shipping policy, returns policy, FAQ page, size charts and product details. PDF, DOCX, TXT, Markdown, CSV, JSON and HTML files all work, or you can paste text.

If you'd like a head start, the E-commerce store template on our chatbot templates page gives you a sensible structure for store questions.

How do you create the bot itself?

Sign up, then upload your files (up to 15 MB each, 10 per upload) or paste text. The bot is ready in seconds. Ask it a few test questions in the dashboard before you put it on your store.

When you're happy, copy the embed code. It's a single script tag, and it's the only thing you'll paste into WordPress.

How do you add a WooCommerce chatbot with WPCode?

WPCode is a popular free plugin for adding code snippets to WordPress without editing theme files. You can find it in the official WordPress plugin directory.

Follow these steps:

  1. In your WordPress admin, go to Plugins > Add New Plugin.
  2. Search for WPCode, then click Install Now and Activate.
  3. Open the new Code Snippets menu and choose Header & Footer.
  4. Paste your InstantKnowledgeBot embed code into the Footer box.
  5. Click Save Changes.
  6. Clear your site cache (more on this below).
  7. Open your store in a private browser window and look for the floating chat button.

That's it. The chat button should appear on every page, including product, cart and checkout pages. The chat panel is isolated from your site's styles, so your theme's CSS won't distort it.

Why use WPCode instead of editing theme files?

You could paste the script directly into your theme's footer file. The problem is that theme updates can overwrite your change, and the chatbot quietly disappears.

WPCode stores the snippet separately from your theme. Your WordPress AI chatbot survives theme updates and even theme switches. It's also easier to remove later if you ever need to.

Are there other ways to add the embed code?

Yes. Any method that places the script site-wide works:

  • Block themes: Edit the footer template part in the Site Editor and add a Custom HTML block containing the script.
  • Child theme: Add the script to your child theme's footer, so parent theme updates don't remove it.
  • Another snippet plugin: Most header-and-footer plugins work the same way as WPCode.

For more WordPress-specific options, see our guide on how to add an AI chatbot to WordPress.

Will caching plugins break your store chatbot?

Usually not, but caching is the most common reason a newly installed chatbot doesn't show up. WooCommerce stores often run a caching plugin, host-level caching and sometimes a CDN. Each layer can serve an old copy of your pages that doesn't include the new script.

The fix is simple: after saving the snippet, clear every cache layer. That means your caching plugin, your host's cache (many managed WordPress hosts have a purge button) and your CDN if you use one.

Which cache settings cause problems?

Optimization features, not page caching itself, are the usual culprits. Look for settings with names like these:

Setting typeWhat it doesEffect on the chatbot
Delay JavaScriptWaits for a scroll, click or tap before loading scriptsChat button appears only after the visitor interacts
Defer JavaScriptLoads scripts after the page rendersUsually fine; button may appear slightly later
Combine JavaScriptMerges scripts into one fileCan break externally loaded scripts
Minify JavaScriptStrips whitespace from scriptsRarely an issue for external scripts, but worth testing
CDN or edge cacheServes cached pages from servers worldwideOld pages may not include the new script until purged

Delayed loading isn't always a problem. Some store owners prefer it for page speed. Just make sure the button still appears once a visitor scrolls or taps.

How do you fix a chatbot that won't appear?

Work through this checklist:

  1. Purge all caches, then reload your store in a private window.
  2. Check the page source in your browser and search for the script. If it's missing, the cached page is still being served or the snippet didn't save.
  3. Exclude the script from optimization. Most caching plugins have an exclusion field for delayed, deferred or combined JavaScript. Add the domain from the embed code's src address.
  4. Test key pages separately. Check a product page, the cart and checkout, since some plugins apply different rules to WooCommerce pages.
  5. Temporarily disable optimization to confirm the cause, then re-enable it with the exclusion in place.

Good news: updating your bot's knowledge never requires touching the embed code. The live bot updates immediately, so there's no need to purge caches when you change a policy.

What store-policy knowledge should you upload?

The embed code gets the bot on your site. Your knowledge determines whether it's actually helpful. For most stores, policies matter more than product descriptions, because policies are where shoppers hesitate.

Start with these documents:

KnowledgeExample questions it answers
Shipping policy"Do you ship internationally?" "How long does delivery take?"
Returns and refunds"Can I return an opened item?" "How long do refunds take?"
Exchanges and warranties"My item arrived damaged. What now?"
Payment options"Do you accept PayPal?" "Can I pay in installments?"
Size guides and fit notes"I'm between sizes. Which should I order?"
Product care and specs"Is this dishwasher safe?" "What's it made of?"
Order help"Where can I see my order?" "How do I contact you?"
Discounts and promotions"Do you offer student discounts?"

Should you upload your product catalog?

It can help, especially if shoppers ask detailed product questions. WooCommerce includes a built-in product exporter that creates a CSV file, and CSV uploads are supported.

Keep it lean, though. Remove columns that don't help answer questions, such as internal IDs or image URLs. Clean, focused data produces better answers. Our guide to preparing documents for an AI chatbot covers formatting tips in more detail.

How should you handle order status questions?

Because the bot can't see individual orders, give it a short note explaining where customers find order details. For example, point them to the My Account page and your contact email. That way the bot gives a useful next step instead of a dead end.

How do you keep store knowledge current?

Prices, shipping rates and promotions change. Update your knowledge whenever a policy changes, and the live bot reflects it right away. A good habit is to review your bot's knowledge whenever you edit a policy page on your store.

The analytics help here too. The unanswered questions report shows what shoppers asked that your documents didn't cover. Those gaps are your to-do list.

How do you stop a store chatbot from making things up?

For a store, a wrong answer about refunds or shipping costs can create real customer service headaches. That's why InstantKnowledgeBot instructs the bot to answer only from your uploaded knowledge and to say so when the answer isn't there.

You can also set a custom fallback message. For example: "I don't have that information yet. Please email us and we'll reply within one business day." This keeps the conversation helpful even when your documents don't cover something.

A few more tips:

  • Be explicit in your policies. Vague wording produces vague answers.
  • Avoid contradictions. If an old PDF and your current returns page disagree, remove the old one.
  • Test tricky questions before launch, such as exceptions, sale items and international orders.

To understand why this matters, read how to prevent AI chatbot hallucinations.

Which plan fits a WooCommerce chatbot?

As of 2026, here's how the plans compare for store owners. Yearly billing gives you two months free.

PlanPriceBotsHosted AI messages/monthGood for
Free$0 forever1100Testing on a small store
Starter$9/month or $90/year35,000Growing stores with steady traffic
Pro$19/month or $190/year1010,000Stores wanting lead capture and no "Powered by" badge
Agency$99/month or $990/year5050,000Agencies managing many client stores

Every plan, including Free, can connect your own API key for Claude, ChatGPT, Gemini or Grok. Messages sent with your own key are unlimited on our side and billed by the provider. Our guide on using your own AI API key explains the setup.

If you run seasonal sales, extra message packs give you 5,000 more messages for $9, and they never expire. See full details on the pricing page.

Your first bot also starts a 14-day Pro trial automatically, with no card required. That lets you try lead capture on your store before deciding. If you'd rather not set anything up yourself, our done-for-you setup service handles it for a one-time $199.

Next steps

Adding a WooCommerce chatbot takes three moves: upload your store policies, paste the embed code with WPCode, and clear your caches. Most of the long-term value comes from keeping your policy knowledge accurate and filling the gaps your analytics reveal.

Ready to try it on your store? Create your free chatbot and have it answering shopper questions today. For more platform guides, browse our Website Integrations articles.

Frequently asked questions

Do I need a dedicated WooCommerce plugin to add an AI chatbot?

No. InstantKnowledgeBot works through a single script tag, so any method that adds code to your site footer will work. WPCode is a convenient free option, but a block theme footer or a child theme also works.

Can the chatbot check a customer's order status?

The bot answers only from the knowledge you upload, so it cannot see individual WooCommerce orders. Instead, add a short note to your knowledge explaining where customers can find their orders, such as the My Account page, and how to contact you.

Will a chatbot slow down my WooCommerce store?

The widget loads from one small script and opens in a panel isolated from your theme. If you are concerned about page speed, your caching plugin's delay option can load the script after the first visitor interaction. Just confirm the chat button still appears when you test.

Do I have to update the embed code when my policies change?

No. You update the knowledge inside your InstantKnowledgeBot dashboard and the live bot updates immediately. The embed code on your store stays the same.

Can I use my own OpenAI or Anthropic API key with my store chatbot?

Yes. Every plan, including Free, can connect its own key for Claude, ChatGPT, Gemini or Grok. Messages sent with your own key are unlimited on InstantKnowledgeBot's side and billed by the AI provider.

Can I run chatbots on more than one WooCommerce store?

Yes. Starter includes 3 bots, Pro includes 10 and Agency includes 50, so you can create a separate bot for each store. Each bot has its own embed code and its own knowledge.

Turn your docs into an AI chatbot today.

Free plan forever, no card needed. Upload your files and get a bot that answers from them in under a minute.