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:
- 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.
- 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.
- 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
- Purchase and download the plugin from Cray Digital.
- In your WordPress admin, navigate to Plugins > Add New > Upload Plugin.
- Choose the
.zipfile, 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:
- In your WordPress admin, go to Products > Categories.
- Click Edit on any existing category (or enter the value when creating a new category).
- Scroll down to find the Xero Account Code field.
- Enter the exact account code from your Xero Chart of Accounts (e.g.,
205for Digital Products,210for Services). - 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:
- WooCommerce processes the order normally.
- When creating the invoice payload for Xero, the plugin checks the category of each line item.
- If a category has a custom code assigned: The plugin automatically substitutes that specific code on the line item.
- If no category code is defined: The line item seamlessly falls back to your global default account code configured in Xero settings.
- 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.

