How to add an AI chatbot to WooCommerce

On WooCommerce, a chat widget is installed through The parent theme's footer.php, or a code-snippets plugin. Changes are live immediately; there is no build or publish step. Custom code is gated: No plan gate — WooCommerce is self-hosted, so you control the code.

Where it goes

The parent theme's footer.php, or a code-snippets plugin

Availability: No plan gate — WooCommerce is self-hosted, so you control the code.

Adding the chatbot to WooCommerce

  1. 1

    In WordPress admin, install a snippets plugin such as WPCode, or open Appearance → Theme File Editor.

  2. 2

    If using the theme editor, select your child theme and open footer.php.

  3. 3

    Paste the snippet immediately before wp_footer() or the closing </body> tag.

  4. 4

    Update the file, then load your storefront to confirm the launcher appears.

  5. 5

    Changes are live immediately; there is no build or publish step.

The snippet you paste

<script src="https://rubyrep.com/rubyrep.js" data-rubyrep="rr_your_public_key" defer></script>

Your own key replaces rr_your_public_key — you get it after training RubyRep on your site.

Worth knowing on WooCommerce

  • Edit a child theme, never the parent — a parent theme update overwrites your changes.

  • Caching plugins such as WP Rocket or W3 Total Cache will serve the old page until you purge.

  • Script-combining and deferral features in optimisation plugins can break third-party widgets; exclude the snippet if the launcher stops appearing.

WooCommerce questions

Where does the code go on WooCommerce?
The parent theme's footer.php, or a code-snippets plugin. Changes are live immediately; there is no build or publish step.
Do I need a paid WooCommerce plan?
No plan gate — WooCommerce is self-hosted, so you control the code.
Will a WooCommerce update remove it?
Edit a child theme, never the parent — a parent theme update overwrites your changes.
Does it slow WooCommerce down?
No measurable effect. The snippet is deferred, so it loads after your page has rendered, and the chat interface itself is only fetched when a visitor opens it.

Related

Get your snippet.

Enter your WooCommerce site and RubyRep reads it, builds your representative, and hands you the exact line to paste.

https://

Takes about a minute. No credit card.

Using something else? See all platforms.