Skip to main content Scroll Top

How to Map WooCommerce Sales to Multiple Xero Account Codes by Category

Cray.Digital Multiple Sales Account Code Plugin

If your e-commerce business sells more than one type of product or service – such as physical goods, digital downloads, subscriptions, workshops, or merchandise – you already know the importance of keeping your Chart of Accounts organised.

In an ideal world, when an order lands in WooCommerce, the revenue automatically funnels into the corresponding account code in Xero:

  • Physical Goods → 200 (Sales – Retail)
  • Digital Downloads → 205 (Sales – Digital)
  • Consulting / Workshops → 210 (Revenue – Services)
  • Branded Merch → 215 (Sales – Merchandise)

Unfortunately, the official WooCommerce Xero integration plugin has a major limitation that catches thousands of store owners, accountants, and bookkeepers off guard.

The Problem: The Single Account Code Bottleneck

By default, the standard WooCommerce Xero extension provides only one global field for your Sales Account code in its settings:

WooCommerce > Settings > Integration > Xero > Sales Account

Every single invoice or order created through your store dumps line items into that one default ledger account.

Why This Causes Chaos for Store Owners & Accountants:

  1. Manual Month-End Journal Entries: Bookkeepers and accountants have to spend hours exporting WooCommerce sales reports, filtering by product or category, and manually reallocating amounts across different revenue accounts using journal entries.
  2. Distorted Financial Reports: During the month, your Profit & Loss statement doesn’t reflect real-time departmental or category margins, making it difficult to judge which product lines are actually profitable.
  3. High Risk of Accounting Errors: Manual ledger adjustments open the door to misallocated revenue, tax reconciliation headaches, and discrepancies between your payment gateways, WooCommerce reports, and Xero balances.

The Solution: Category-Level Xero Sales Account Overrides

Rather than hacking your theme files, maintaining brittle custom PHP snippets, or wasting billable hours on spreadsheets every month, the cleanest solution is to override the Xero account code dynamically based on the product’s category.

With the WooCommerce Xero Multiple Sales Account Code Plugin by Cray Digital, you get direct, granular control without replacing your existing official Xero extension.

Step-by-Step Guide: Setting Up Multiple Sales Account Codes

Here is how to configure category-based account mapping in under 5 minutes:

Step 1: Ensure Your Official Xero Integration Is Connected

Make sure you have the official WooCommerce Xero integration active and linked to your Xero organisation. Confirm that your default fallback sales account (e.g., 200) is set under WooCommerce > Settings > Integration > Xero.

Step 2: Install & Activate the Cray Digital Multiple Sales Account Code Plugin

  1. Purchase and download the plugin from Cray Digital.
  2. In your WordPress admin, navigate to Plugins > Add New > Upload Plugin.
  3. Choose the .zip file, click Install Now, and then Activate.

Step 3: Assign Xero Account Codes to Product Categories

Once active, the plugin adds a dedicated Xero Account Code field directly into your WooCommerce product categories:

  1. In your WordPress admin, go to Products > Categories.
  2. Click Edit on any existing category (or enter the value when creating a new category).
  3. Scroll down to find the Xero Account Code field.
  4. Enter the exact account code from your Xero Chart of Accounts (e.g., 205 for Digital Products, 210 for Services).
  5. Click Update.

(Repeat this quick step for each product category that requires a separate ledger account.)

How It Works in Practice

When a customer checks out:

  1. WooCommerce processes the order normally.
  2. When creating the invoice payload for Xero, the plugin checks the category of each line item.
  3. If a category has a custom code assigned: The plugin automatically substitutes that specific code on the line item.
  4. If no category code is defined: The line item seamlessly falls back to your global default account code configured in Xero settings.
  5. In Xero, your invoice appears immediately with each item mapped to its rightful revenue account.

Example Multi-Item Checkout:

Item Category Category Code Resulting Xero Account
Ergonomic Office Chair Furniture 200 200 - Sales (Physical)
Assembly Service Services 210 210 - Service Revenue
Ergonomics PDF Guide Digital Downloads 205 205 - Digital Sales

No manual adjustments. No split reconciliation journals. Zero custom code maintenance.

Frequently Asked Questions

Does this replace the official WooCommerce Xero integration?

No. This plugin acts as an enhancement to the official WooCommerce Xero extension. You keep your existing secure connection, invoice synchronisation, and customer sync intact—our plugin simply unlocks category-level account mapping.

What happens if a product belongs to multiple categories?

If a product has multiple categories assigned, the plugin applies the code from the primary category. If none of the assigned categories have a custom code, it safely falls back to your standard global account code.

DOES THIS WORK FOR VARIABLE PRODUCTS?

Yes, the plugin finds the primary category associated with the parent product, and uses the account code if it is defined.

Stop Wasting Hours on Manual Bookkeeping

Eliminate month-end accounting headaches and get real-time revenue visibility in Xero.

👉 Get the WooCommerce Xero Multiple Sales Account Code Plugin for £49.99 — instant download from Cray Digital.

Privacy Preferences
When you visit our website, it may store information through your browser from specific services, usually in form of cookies. Here you can change your privacy preferences. Please note that blocking some types of cookies may impact your experience on our website and the services we offer.