Сүрөттөө
This plugin implements French accounting law: the Plan comptable général and
the FEC file (Fichier des Écritures Comptables). It is of no use to a store
outside France.
Watch the plugin in action (about a minute, in French):
Is your accountant asking for a file? Your WooCommerce store knows how to sell,
but it does not keep an accounting journal. This plugin fills that gap.
Every time an order is paid, it automatically writes a balanced accounting entry
that follows the French chart of accounts (Plan comptable général): revenue, VAT
collected per rate, shipping charged to the customer, and the payment received.
You read the journal from your dashboard, and export it whenever you are asked
to.
This plugin targets French e-commerce: it produces entries for the French chart
of accounts and an FEC file (Fichier des Écritures Comptables), the ledger export
that French tax authorities may request during an audit.
What the plugin does
- Automatic entries. A paid order creates an entry. A refund is reversed
(contra entry), never deleted: the audit trail stays intact. - Multi-rate VAT. A single order may carry 20%, 10% and 5.5% items. Each rate
gets its own VAT line. Shipping is posted separately, with its own VAT. - History replay. Installing today but selling for two years? Pick an anchor
date and replay your past orders. The operation is idempotent: running it again
never creates duplicates. - Readable journal. One screen, one list, a permanent balance check
(sum of debits = sum of credits) and a summary of balances per account. - CSV export for your spreadsheet or your accountant, and FEC export
(18 mandatory columns) for the tax authorities. - HPOS compatible (High-Performance Order Storage), as well as legacy storage.
Accounts used
These are the default numbers. There is no settings screen: a developer can
override each of them with a filter, for instance comptafec_account_ventes to post
revenue to 706 instead of 707.
411Clients — customer receivable, the pivot of the sale707Ventes de marchandises — revenue, excluding tax44571TVA collectée — VAT collected, one line per rate7085Ports et frais accessoires facturés — shipping charged5115Cartes bancaires à l’encaissement — card payments in transit471Compte d’attente — amounts that could not be assigned to a sales account; your accountant reclassifies them4718Ventes à ranger — sales an add-on declined to assign, when several accounts share one VAT rate
What the plugin does not do (and why)
We would rather say it before you install.
Payments are posted to account 5115 (“card payments in transit”), not
directly to the bank account (512). This is not a shortcut: when a customer
pays by card, the money first sits with the payment provider, which deducts its
fee and settles the remainder later, often bundling several orders together. The
amount actually credited to your bank account is therefore only known afterwards.
The trade-off is deliberate: your revenue and your VAT are correct, but
account 5115 stays open until the provider’s payout has been reconciled against
your bank statement. That reconciliation, and the recording of provider fees, are
outside the scope of this free version.
The plugin also assumes a store selling in euros, under French VAT, to
consumers.
Your data
No data leaves your server. The plugin calls no external service. The accounting
export aggregates sales on the collective account 411 Clients: it contains no
customer name, address or email address.
Pro version
The free plugin is complete on its own: nothing here is time-limited or locked.
A separate paid add-on, Comptabilité et Export FEC Pro, is available for
stores whose chartered accountant needs a ready-to-import file. It adds six
accounting-firm export formats (ISACOMPTA, Sage, EBP, Pennylane and more)
and per-account monthly subtotals on screen. Details
and pricing: https://www.ferreiro-studio.fr/compta-fec/tarifs/
Скриншоттор





Орнотуу
- Install and activate WooCommerce first.
- Upload the plugin to
/wp-content/plugins/, or install it from Plugins Add New. - Activate the plugin. The journal tables are created automatically.
- Go to WooCommerce Accounting (Comptabilité on a French site).
- Your next paid orders will generate their entries immediately. For your past orders, pick an anchor date and click Replay history (Rejouer l’historique on a French site).
FAQ.KG
-
Is the FEC file compliant?
-
The file follows the mandatory 18-column structure defined by French tax law
(article A. 47 A-1 of the Livre des procédures fiscales): dates as YYYYMMDD,
decimal comma, balanced entries. Compliance of a FEC file also depends on the
consistency of your bookkeeping as a whole: have it reviewed by your chartered
accountant before any audit. -
What happens when I refund an order?
-
The plugin records a reversing entry (contra entry), prorated for a partial
refund. The original entry is neither modified nor deleted: that is the rule in
accounting, and it is what makes the journal trustworthy. -
Can I safely run the history replay again?
-
Yes. Every entry is tied to its source order; an order already recorded is
skipped. A second replay therefore reports zero entries created. -
Why does my 5115 account never clear?
-
That is the expected behaviour of the free version. Account
5115receives the
money collected by your payment provider. It is only cleared when that provider’s
transfer reaches your bank account — a reconciliation step that is not included
here. See “What the plugin does not do”. -
I open the FEC file in Excel and the accents are broken. Is it a bug?
-
No, the file is correct. The FEC is encoded in plain UTF-8, without a byte order
mark, because it is meant for tax authorities and accounting software, some of
which reject that mark. Excel guesses the encoding and gets it wrong.To read it comfortably: in Excel, use Data From Text, then choose the
UTF-8 encoding and the tab separator. The file you hand to your accountant
needs no change. The CSV export, designed for spreadsheets, opens directly. -
Can my theme or my other plugins distort the entries?
-
The plugin reads orders through the official WooCommerce API, relying on the
totals computed by WooCommerce itself. If your order totals are right, your
entries are right. -
Does the plugin handle several currencies, intra-EU VAT or B2B?
-
Not in this version. The store is assumed to sell in euros, under French VAT, to
consumers.
Сын-пикирлер
Contributors & Developers
“Comptabilité et Export FEC for WooCommerce” is open source software. The following people have contributed to this plugin.
Мүчөлөрү“Comptabilité et Export FEC for WooCommerce” has been translated into 1 locale. Thank you to the translators for their contributions.
Translate “Comptabilité et Export FEC for WooCommerce” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Өзгөртүүлөр
0.6.0
- Fixed: on a French store, part of the plugin was shown in English. Since WordPress 6.7, a plugin’s translation files are no longer loaded the way this plugin loaded them, and only one catalogue was ever read — so any phrase added after the last translation round fell back to English, mixed in with the French ones in the same notice. Both catalogues are now loaded explicitly, the official language pack first and the one shipped with the plugin underneath. The phrases you already saw in French are unchanged, to the character.
- Fixed: the plugin’s database tables could never change again once installed. Creating them was tied to activating the plugin, and updating a plugin does not re-run activation. On any site installed before this release, a new column or index would simply never arrive, and entries written against the outdated table would fail without a word. The plugin now checks the tables it actually finds in the database and brings them into line, whatever brought it there — an update from the plugin screen, an automatic update, WP-CLI, or a database restore.
- Fixed: a lost unique index could duplicate your entire journal. The whole “Replay history” feature relies on one unique index to avoid duplicates. If that index disappeared after the fact — a database restore, a repair tool, a host intervention — every replay silently duplicated the entire journal, and nothing on screen said so. History replays and exports now verify the real tables before doing anything.
- Fixed: an entry could be reported as saved when its lines had not been written. The plugin now reads back what actually reached the database — how many lines, and for what amounts — before returning success. A document that did not go through is refused, cleaned up, and listed in the alerts, so a replay can write it properly.
- New: fully refunded orders whose accounts do not return to zero are now detected and listed. Every document could be faithful on its own and the resulting balances still be wrong: on one real order, the sales account was left holding 0.01 € and the VAT account minus 0.01 € after a full refund, and no check saw it, because each entry balanced. Your turnover for the month and the VAT you report were both off, silently. The plugin now checks what the documents of an order add up to, not only each document on its own.
- A credit note is now posted to the same accounts as the invoice it cancels. Until now the account was resolved again at refund time, from the product’s category as it stands today. If the product had been filed elsewhere in the meantime, the refund landed on a different account: two entries, both balanced, both faithful — and a balance that never cleared. The refund amounts, quantities and VAT still come from WooCommerce, exactly as reported; only the account now comes from the original entry.
- When a refund cannot be matched to the original entry, it is reported rather than guessed. If several accounts share one VAT rate the amount goes to the unassigned sales account (4718 by default); if there is no original entry at all it falls back to the ordinary sales account, as before, and the alert says so. Either way the plugin still never invents a sales account of its own.
- Alerts no longer hide one another. When several things were waiting at once — an unbalanced suspense account, refunds to look at, a pending update — the notice showed only one of them, and the others appeared once you had dealt with the first. Every pending state is now listed, on every admin screen, with the button that resolves it. And a success message now speaks only of what was actually verified: “tables are up to date” no longer implies that everything else is done.
- When the tables cannot be brought up to date — a hosting account without the ALTER privilege, for instance — the plugin says so in the admin, names the table and what is missing, and offers a Retry button. It no longer claims success it has not verified.
- One honest limit is worth knowing: on ordinary page loads the table check runs at most once every 15 minutes, so that browsing your shop costs nothing. History replays and exports check every single time, without exception — those are the moments where not knowing would cost you.
- No change to the exported files for documents that were already written correctly: on a store running the plugin on its own, their CSV and FEC output is byte-for-byte identical to that of 0.5.0. The only entries that change are the ones an earlier version had left incomplete — a header with no lines — which a replay now writes properly. The CSV and FEC layouts themselves are untouched.
-
For add-on developers: a new
comptafec_ligne_ventefilter lets an add-on decide the sales account of an order line. The decision is validated on the way in and rejected as a whole if it is malformed, never repaired field by field. Lines now carry the role they play rather than being recognised by their account number, so changing an account number no longer changes the meaning of entries already written. A seventh account role,ventes_non_rangees(4718 by default), holds sales an add-on declined to assign; the suspense account (471) keeps its own role. -
Fixed: on a narrow screen the whole admin page scrolled sideways. The journal table is wider than a phone screen, and it dragged the entire document along with it. Wide content now scrolls inside its own area, and the page itself stays put.
- Fixed: the plugin’s stylesheet painted tables belonging to other extensions shown on the same screen. They stayed legible by luck, not by design: an add-on using light text on its table headers would have become unreadable. The stylesheet now paints only the plugin’s own markup. Add-on developers should note that CSS class names starting with
comptafec-are reserved for the plugin: using one means inheriting its appearance, which can change between versions. - The highlighted figure in the summary was set apart by colour alone, below the 3:1 contrast ratio expected of a non-text indicator. It now carries a band as well as a colour, so the distinction no longer depends on telling two shades apart.
0.5.0
- Fixed a defect that could make your books wrong while making them look right. When an order carried a line the plugin did not read — a fee, or a cart-level discount added by another extension — the amount silently vanished from the entry, VAT included. The entry still balanced, because the customer account was computed from the lines that were present, so nothing looked wrong. Every document is now reconciled against the WooCommerce order total, to the cent.
- Fixed: a refund entered as a plain amount, with no line item attached, produced no accounting entry at all. The refunded amount stayed in your turnover.
- VAT is now reconciled separately from the net amounts, and always booked at the amount WooCommerce reports. A gap in the assignment of turnover can no longer turn into a gap in your VAT return.
- When an amount cannot be assigned to a sales account, it is booked to a suspense account (471 by default) instead of being dropped or guessed. The screen shows the balance, lists the documents concerned, and keeps saying so until the balance is cleared. Your accountant posts the reclassification entry: the plugin never invents a sales account.
- A document is now refused only when the WooCommerce total itself is unusable — missing, negative, or zero with lines present. That case is reported, never silently skipped.
- Exported files change with this version. Documents that were missing now appear, and suspense account lines may appear where amounts could not be assigned. The CSV and FEC layouts are untouched: what changes is that their content is now complete.
- For add-on developers: the suspense account number can be changed with the
comptafec_account_attentefilter, like the five existing account roles.
0.4.1
- Removed a claim the plugin does not keep: the Pro teaser announced reorderable CSV columns. The Pro version does not offer that. The wording now lists only what it actually does — the accounting-firm export formats and the per-account, per-period subtotals.
- The admin screen has been rebuilt on the plugin’s 2026 visual identity. Appearance is now carried entirely by a stylesheet instead of inline styles, which makes it consistent with the rest of the plugin and easier to maintain.
- No change to the exported files. The CSV and FEC output of 0.4.1 is byte-for-byte identical to that of 0.4.0.
0.4.0
- Fixed: on a site running with WP_DEBUG display enabled, the plugin loaded its translations too early. Since WordPress 6.7 this prints a notice before the HTTP headers, which breaks cookies and can make it impossible to log into the admin. Translations are now loaded on
init. - The plugin is now translatable. Source strings are in English, as the WordPress.org translation platform requires, and a complete French translation ships with the plugin: a French store sees exactly the same screen as before.
- The journal now shows readable labels in the Type and Source columns, instead of the raw values stored in the database.
- Fixed: the replay summary no longer writes “0 écritures créées” — singular and plural now agree.
- Accounting labels are unchanged, by design: the 18 FEC columns, the chart of accounts labels and the CSV headers stay in French whatever the site language. They are set by French law or by what your accounting software expects at import, not by the interface. The exported files are byte-for-byte identical to those produced by 0.3.0.
- For add-on developers:
comptafec_register_exportsnow fires oninit(priority 5) instead ofplugins_loaded. No add-on is affected: registering the callback when the add-on’s main file loads still works, and hooking oninitwith a priority below 5 now works too, which it did not before.
0.3.0
- Fixed: an export that could not run (unknown format, insufficient rights) was counted as a successful export. Success is now recorded only once the file has actually been produced.
- New extension hook
comptafec_export_sent, fired when an export has really been generated. - A one-time notice may now ask for a review on WordPress.org, only after at least three successful exports and seven days of use. It offers “Leave a review”, “Later” (30 days) and “No thanks”, plus a link to the plugin support forum shown at the same level. Nothing is offered in exchange for a review, no question decides where you are sent, and dismissing it is remembered for good.
0.2.1
- The admin screen now follows the plugin’s own visual identity.
- Mentions the paid add-on in three places, all inside the plugin’s own screens: a link on the Plugins list, a teaser on the settings screen and a notice after an export. The notice can be dismissed for good, and every mention disappears once the add-on is active.
- No feature is locked, removed or degraded. No external request is made.
0.2.0
- Export screen now driven by a registry: any add-on can declare its own format.
- Export can be limited to a range of months.
- Public extension API for add-ons (see API-PUBLIQUE.md):
comptafec_register_exports,comptafec_entries,comptafec_export_rows,comptafec_summary_tiles, admin hooks. - No feature of the free plugin is locked or removed.
0.1.1
- Internal prefix renamed for consistency. No change in behaviour.
0.1.0
- First release.
- Automatic entries on paid orders and refunds (contra entries).
- Multi-rate VAT per order line, shipping posted separately.
- Idempotent history replay from an anchor date.
- Journal, balance check and account summary in the admin.
- CSV and FEC exports.
- HPOS compatibility declared.
