TomaTuFactura for WooCommerce

By Acolor Software SL

0+ active installationsVersion 0.3.4

Stock, prices and catalogue from TomaTuFactura to WooCommerce, and every order back with its VeriFactu invoice (Spain).

Description

TomaTuFactura (https://tomatufactura.com) is a Spanish invoicing and stock program. With this plugin:

  • Catalogue, prices and stock come from TomaTuFactura: names, descriptions, images, categories with their tree, price, VAT and available stock (of the warehouses that sell online, minus the safety stock). Changes arrive instantly through signed notifications; if your hosting blocks them, the plugin asks every 15 minutes.
  • Every order goes into TomaTuFactura as a customer order that reserves stock. When it is completed (or paid), TomaTuFactura issues the invoice (simplified without a tax ID, full with it) with VeriFactu. The plugin stores the PDF in the order, attaches it to the «completed order» email and offers it in My account › Orders.
  • Tax ID in the checkout (NIF/CIF/NIE, validated) for customers who want a full invoice.
  • Cancellations and refunds create the corrective invoice in TomaTuFactura and return the goods to the warehouse.

TomaTuFactura is in charge of the product: changes made in WooCommerce to synced products are overwritten on the next sync.

External service

This plugin connects to the TomaTuFactura API at https://tomatufactura.com/api/v1/ with the key you create in your TomaTuFactura account. It sends the shop’s orders (items, amounts, payment method) and the buyer’s billing data (name, company, tax ID, email, phone, address) so that TomaTuFactura can issue the invoice, and it downloads the catalogue, stock and invoice PDFs. Nothing is sent anywhere else. Terms: https://tomatufactura.com/condiciones/ · Privacy: https://tomatufactura.com/privacidad/

Installation

  1. In TomaTuFactura, Income › Online shop: write your shop address, activate it and press «Create key for the shop». Copy the key and the secret (they are shown once).
  2. Install and activate this plugin. Go to WooCommerce › TomaTuFactura, paste the key and the secret, save and press «Test connection».
  3. In TomaTuFactura, tick «Published in the shop» on each item (Online shop tab).
  4. Press «Sync everything».

WP-CLI: wp tomatufactura sync [--full], wp tomatufactura status, wp tomatufactura orders --since=2026-11-01.

FAQ

My shop already invoices with another plugin

Activate «Stock only» in TomaTuFactura (Income › Online shop): orders deduct stock but are not invoiced there.

An order shows «SKU … not found»

The product SKU must be the code of a TomaTuFactura item (or of one of its variants).

Changelog

0.3.4

  • The discount codes of each order reach TomaTuFactura, so its loyalty coupons count their uses.

0.3.3

  • Requesting a full invoice for an order now requires proof of ownership: the logged-in customer for registered orders, and the order key plus the billing email for guest orders (offered on the «order received» page).
  • The «Restock refunded items» choice is taken from the refund WooCommerce creates, not from the request.
  • Notifications from TomaTuFactura are checked against their signature before they reach the endpoint.
  • Settings and actions in WooCommerce › TomaTuFactura are saved again, and notifications are accepted again (both broken by the renaming in 0.3.2).

0.3.2

  • Unique prefix for every class, constant, option, hook and metadata key (TomaTuFactura_WC_, TOMATUFACTURA_WC_, tomatufactura_wc_); settings, product links and order data from earlier builds are moved over automatically.
  • Translations are no longer bundled: they come from translate.wordpress.org.
  • WP-CLI command renamed to wp tomatufactura.

0.3.1

  • An order that never reached TomaTuFactura and is cancelled in the shop is no longer sent.
  • Failed status changes and refunds are retried also when the key is rejected (401/403); a refund that cannot be sent leaves a note in the order and goes to «Retry errors».
  • Retries and «Retry errors» send the status the order has now, not the one it had when it failed.
  • Products that fail to save during a sync are retried on the next check.
  • Each call says which shop it comes from, so TomaTuFactura keeps apart the orders of two shops whose order ids repeat; status changes carry the order total, so an order edited in the shop is flagged.
  • An invoice PDF that cannot be saved is logged and downloaded again on the next status change or retry.

0.3.0

  • TomaTuFactura is in charge of the orders: in preparation, on hold, shipped with tracking, delivered, cancel and refund from TomaTuFactura are applied in WooCommerce (notification and a 5-minute check, never twice).
  • Order lines carry the TomaTuFactura item and variant (exact even without SKU); fees are sent as lines.
  • Refunds send the total, every line with its name and whether the goods go back to stock; a failed payment no longer cancels the order.
  • «Send missing orders» button; notifications are queued without long texts and only marked as seen once queued.

0.2.3

  • «Disconnect» button: removes the key and forgets the links between products and TomaTuFactura items (orders stay).
  • Saving the key of another company forgets the previous links too; on the next sync, products and variations are matched by SKU with what the shop already has.

0.2.2

  • Bundled Spanish and Catalan translations loaded without load_plugin_textdomain() (no Plugin Check warnings).

0.2.1

  • Ready for WordPress.org: slug «tomatufactura-for-woocommerce», escaped error messages, sanitised settings and a clean package.

0.2.0

  • Partial refunds create the corrective invoice of what was returned; a full refund after partial ones corrects the rest.
  • Tax ID field in the block checkout too.
  • «Invoice with your tax details» in My account replaces the simplified invoice with a full one.
  • Stock reserved for a few minutes while the buyer pays.
  • «Bring products to TomaTuFactura» to start from an existing shop.

0.1.1

  • Fixed: products and categories are found by their TomaTuFactura id with a direct query (the generic query could pick another one).
  • Fixed: polling also picks up stock changes (cambiado_desde) and sends the time in UTC with «Z».
  • Fixed: the sync summary goes to the right address.

0.1.0

  • First version: catalogue and stock sync, notifications, orders with invoice, tax ID in the checkout, settings and log.