eCommerceApril 14, 2026·15 min read

How to automate WooCommerce with n8n + AI: MrCoolCat real case

Real WooCommerce store optimisation and automation case study: plugin cleanup, n8n stock sync, optimised checkout and AI support agent.

SM
SprintMarkt
Development Team

A five-year-old WooCommerce store tends to look like an attic. Plugins piled up, scripts nobody remembers adding, a cart that flickers before rendering and stock levels that say one thing on the site and something else in the warehouse. We see it on almost every audit we run. This post is an honest walkthrough of how we tidied up and automated the MrCoolCat store, a SprintMarkt client specialised in craft beer.

Starting point: the diagnosis

MrCoolCat had been selling for years on a WooCommerce site that kept growing by adding plugins whenever a new need popped up. The homepage worked, but the funnel broke at the last steps: slow cart, checkout with visible flickers and complaints about wrong stock when a product showed as available on the site but was already out in the warehouse. We started with a two-week technical audit before touching a single line of code.

Step 1: plugin audit

Opening the admin we found roughly forty active plugins. Many did the same with different names, some had not been updated in years, and three were clashing with each other. The process was unglamorous but essential:

- List every plugin with its actual purpose and last update date.

- Sort into three buckets: keep, merge with another or remove.

- Test every removal in a cloned staging environment, never in production.

- Document what broke when disabling each candidate before touching the live store.

The main risk here is killing a feature used by only 2% of customers yet critical (for example, a regional payment method). Staging discipline and a validation checklist kept that from biting us.

Step 2: eliminating FOUC in cart and checkout

FOUC (Flash Of Unstyled Content) is that half second where the cart renders unstyled, looks ugly and then snaps into place. It smells like an amateur shop and kills conversion. WooCommerce FOUC usually comes from three places:

- Plugin stylesheets loading after the initial render.

- Heavy scripts blocking the DOM tree while the browser lays out the cart.

- Child themes with duplicated CSS taking too long to resolve.

We fixed it by extracting critical CSS for cart and checkout into an inline `<head>` block, deferring anything non-critical and blocking on those pages the plugins that added no value to the payment funnel (pop-ups, social widgets, marketing tools). The cart started rendering stable from the first frame.

Step 3: real performance of cart and checkout

Underneath the visual problem there was a deeper one: too many SQL queries per page. WooCommerce with certain loyalty and shipping plugins can fire hundreds of queries on checkout. We did three things:

- Replace badly implemented AJAX (full reloads disguised as AJAX) with real endpoints returning JSON.

- Object-cache products and categories using Redis.

- Trim redundant hooks other plugins were registering on `woocommerce_checkout_update_order_review`.

Mobile 4G load time dropped from around 6 seconds to under 2 on the critical pages. Ballpark, not a magic number: it depends on the user's network.

Step 4: stock sync with n8n

Stock was the number one complaint. The physical warehouse worked on its own system and fed the site manually once a day. We built a self-hosted n8n workflow that automates it every 15 minutes:

```

Warehouse DB (MySQL) --(cron SELECT)--> n8n

n8n --(SKU diff)--> in-memory queue

queue --(WooCommerce REST API)--> stock update

n8n --(if drift > threshold)--> Slack + email alert

```

The workflow includes retries with exponential backoff, a brake circuit if the API returns massive errors, and a persistent log in Postgres so we can audit what changed and when. Stock went from being out of sync for hours to a 15-minute worst case.

Step 5: low-stock alerts

With the previous flow in place we already had a live pulse. Adding alerts was cheap: when a SKU drops below the category-specific threshold (not every product has the same target stock), n8n fires a notification to the team's Slack channel and a WhatsApp Business message to the purchasing lead. The message includes the SKU, current stock, last-week sales pace and a direct link to the product in admin. The decision stays human, but the heads-up arrives before the stockout.

Step 6: draft orders from WhatsApp Business

MrCoolCat gets many WhatsApp inquiries that end up in orders. The problem was the jump to the computer to create the order manually. The new flow:

1Customer sends a message to WhatsApp Business.
2Webhook into the n8n workflow.
3n8n detects products mentioned by name or SKU against the catalog.
4If the purchase intent is clear, it creates a `draft` order in WooCommerce.
5A human validates quantities and data and, if correct, a payment link is sent to the customer.

Important: we do not auto-close the order. The human stays in the loop precisely to avoid mistakes that in the beer space (expiry dates, batches) can be expensive.

Need help with your project?

Calculate your budget in 2 minutes with our interactive tool.

Calculate budget

Step 7: invoice automation (SII + Facturae)

Invoicing in Spain has its own demons. We connected the post-payment flow with the invoicing system to:

- Generate a PDF with MrCoolCat's own template on payment confirmation.

- Email the PDF to the customer with a localised template.

- Report the invoice to the Spanish tax authority SII when applicable.

- Keep a digitally signed copy in internal storage.

All of this used to live in three scattered places. Now it runs in a single workflow with logs and retries. The admin team went from spending weekly hours on operational invoicing to a short supervising review.

Step 8: redesigned checkout

The final step was redesigning checkout itself:

- Trim form fields to the legal and commercial minimum.

- Add a delivery date estimator based on postcode and shipping method.

- Show real icons for accepted payment gateways (not a generic 'secure payments' badge).

- Insert discrete trust badges with return guarantee and SSL certification.

- Give immediate field validation feedback instead of waiting for submit.

Checkout abandonment dropped visibly, without promising exact numbers: it varies a lot by campaign and season.

What we did not do

Honesty first: we did not build a full AI support agent. We evaluated options, but at MrCoolCat's current scale a basic FAQ router on WhatsApp Business combined with human answers works better than an expensive LLM that could invent pairings or get alcohol percentages wrong. A full AI agent stays in the backlog as phase 2, for when the volume justifies it. Not every problem gets solved with AI, and saying that out loud is part of the job.

Results, in a realistic range

No magic figures or fabricated testimonials:

- Mobile load time roughly cut to a third on cart and checkout.

- Wrong-stock complaints essentially gone after the first month of the new flow.

- Time spent on operational invoicing slashed to a fraction of what it was.

- Visible improvement in checkout conversion, variable by campaign and season.

- Internal team freed up for commercial tasks instead of admin ones.

Common mistakes to avoid on similar projects

- Attacking checkout without cleaning plugins first: you keep dragging invisible weight.

- Auto-closing orders without human validation on products with expiry or regulation.

- Ignoring SII until the last quarter and having to improvise.

- Measuring only speed and not error rate on stock sync.

- Buying a premium plugin every time a problem pops up instead of asking whether another plugin you already have solves it.

What works well for us today and we propose to similar clients:

- WooCommerce on WordPress as the base, but with audited and maintained plugins.

- Self-hosted n8n for orchestration and internal automations.

- Redis as an object cache, not just a page cache.

- Postgres or MySQL for workflow logs and audit.

- Official WhatsApp Business API for a conversational channel owned by the business.

- Facturae and SII connection to comply with Spanish regulation.

- Cloudflare in front for CDN, WAF and bot control.

Next step

If your WooCommerce looks like MrCoolCat a few months ago — forty plugins, slow checkout and out-of-sync stock — we can run a free 30-minute diagnosis with you. Our WooCommerce optimisation + automation projects start at 6,500€, with a crystal-clear scope from day one: no surprise invoices, no 'digital transformation' buzzwords. Drop us a couple of lines about your store and we will tell you if it makes sense for us to jump in.

#WooCommerce#n8n#automatización#ecommerce#MrCoolCat#IA#stock#checkout
Share:

Have a project in mind?

Tell us your idea and we'll help make it happen. No-obligation quote.

Presupuesto sin compromiso

Have a project in mind?en mente?

Tell us your idea and we'll help you make it happen. No-obligation quote.

Respuesta en 24h
100% confidencial
Sin compromiso