WP Manifestindependent plugin directory
manifest / unclassified / woo-xero-custom-codes

Woo Xero Custom Codes self-updates

Set a Xero sales account code per product and per WooCommerce variation, overriding the single global code from WooCommerce Xero.

by Paul Faulkner · github.com/headwalluk/woo-xero-custom-codes · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/headwalluk/woo-xero-custom-codes/archive/refs/heads/main.zip

Ships its own WordPress updater (built-in updater), so new versions show up under Dashboard → Updates.

Set a Xero sales account code per product and per variation in WooCommerce, instead of sending every line to the one global code.

The official WooCommerce Xero extension configures a single sales account for all order line items. This plugin adds an account code field next to the Tax class dropdown on products and variations, and applies it when the invoice is built:

variation code  ->  parent product code  ->  global (WooCommerce Xero setting)

Leave a field blank and it falls through to the next level, so the global setting stays in charge of everything you don't explicitly override. Shipping, fee and rounding lines are untouched — they keep the accounts configured in WooCommerce Xero.

Who it's for

Shops whose catalogue spans more than one revenue account — mixed physical and digital goods, zero-rated alongside standard-rated ranges, or separate product lines that need to land in separate accounts for reporting. If your accountant has ever asked for sales to be split out in Xero, this is the gap it fills.

It's aimed at the people who actually maintain the chart of accounts: the field sits with the tax settings on the product, and takes a plain account code.

Requirements

  • WordPress 6.5+
  • WooCommerce 9.0+
  • WooCommerce Xero 1.9+ (a paid extension, and required — WordPress will not let this plugin activate without it)
  • PHP 8.0+

Installation and updates

Download woo-xero-custom-codes.zip from the latest release and install it through Plugins → Add New → Upload Plugin.

The plugin checks GitHub for new releases and offers them through the normal WordPress Plugins screen, so there is nothing extra to install for updates. To pin a site to its current version, add add_filter( 'wxcc_updater_enabled', '__return_false' );.

Documentation

Each document targets one audience.

  • docs/getting-started.mdsite operators. Setting codes on products and variations, how precedence works, and getting the codes right
  • docs/hooks.mddevelopers. The filters this plugin emits and the hooks it consumes
  • docs/how-it-works.mddevelopers. How it attaches to WooCommerce Xero, which filter we use and which we deliberately avoid

Per-version release notes: CHANGELOG.md.

Contributing

Issues and pull requests are welcome. Code follows WordPress Coding Standards — run phpcs before opening a PR.

License

Licensed under GPLv2 or later. Built and maintained by Headwall Hosting.

Not affiliated with Xero or with Automattic / WooCommerce.