
DahuConcept Serial Numbers for WooCommerce
v1.6.0Hugo Vial-Jaime · 2026年11月27日 上架
Per-unit traceability for WooCommerce: a serial number on every unit you ship, a lifecycle with real rules, a full history and a packing screen.
- 正在使用
- 10 以下
- 评分
- 暂无
- 累计下载
- 0
- 最近更新
- 2026年11月27日
贡献者
截图
Two questions, asked months apart.
A customer calls about a part that has failed. Which one did they get, which
batch was it from, and how many others from that batch went out? Without serial
numbers the answer is the order date and a guess.
A batch turns out to be faulty. Which customers have one, and which units are
still on the shelf? Without serial numbers the answer is everybody who bought
that product, which is both too many people to write to and not the right ones.
DahuConcept Serial Numbers answers both, because every unit has a row and every row
has a history.
The lifecycle
Thirteen statuses — received, in stock, assigned to an order, shipped, return
expected, returned as described, returned not as described, in repair,
repaired, replaced, going back to stock, held not counted as stock, destroyed —
and a matrix that says which moves are legal. Every status change goes through one check, and there is
no flag anywhere that turns it off.
A unit that came back not as described may be repaired, replaced or destroyed.
It may not go straight back on the shelf: that one really would be a guess.
A unit put back in stock is a free unit: the order, the order line, the service
ticket and the replacement pointer are all cleared. Nothing is lost — what was
cleared is written into the history line.
WooCommerce stock
Off until you switch it on. With it on, the stock of a serialised product
becomes the number of units in stock on no order, less the pieces orders being
prepared have already reserved — written as a whole number, never as an
increment. Variable parents, products whose stock WooCommerce does not manage,
products not marked as serialised and products that are not on sale — in the
bin, a draft, scheduled or pending — are left alone and named on the Stock
screen; a product going back on sale is brought up to date straight away. A target below zero is written as zero and the shortfall is named. The
Stock screen shows every product and what would be written before anything is,
and its manual resynchronisation works whether the automatic push is on or off.
When a box went in under the wrong product
Units in stock can be re-filed under another product: a dry run first, a reason
required, all of the list or none of it, in a transaction, and undoable as long
as nothing else has happened to the units since. Off until you switch it on,
and the dry run works either way. A unit on an order, or not in stock, is
refused: its product is what that order or that case says it is.
The packing screen
A page of its own, off until you switch it on, built for a tablet on a
workbench. It signs in with one login per bench rather than one per person: a
packer does not need a WordPress account to scan a number, and giving them one
means giving them the admin.
It lists the orders waiting, takes one scan at a time and checks it against the
shop as it happens, refuses a line more units than it ordered, and will not
close a parcel while a unit on it is unaccounted for.
A barcode reader is a keyboard, and many suppliers encode a URL on the label
rather than the number. The whole address lands in the field, and the plugin
reduces it to the serial.
Shipping
The plugin closes a parcel: every unit is recorded as having left, the carrier
and tracking number go on the order, and the order moves on. It does not talk
to a carrier — no label creation, no API credentials — because that needs an
account and a configuration particular to one shop. A carrier integration plugs
in with two filters and no changes to this plugin. The filter that creates the label receives the consignment, so the integration knows which units it is labelling.
Consignments
A consignment is the set of units that left the shop, or came back, together,
under one reference: C-2026-00042 going out, R-2026-00007 coming in. It answers
the question support is actually asked: which units were in the parcel with this
tracking number?
- Partial shipments: ship part of an order in one parcel and the rest in another, each with its own tracking number. The completeness check applies to a whole-order shipment only, because an order leaving in two parcels necessarily has units without a serial while the first one goes.
- A “Consignments” screen in the admin: search by reference, tracking number or serial number in one box. Its only action is cancelling a consignment left open by an interrupted process; a closed consignment can never be cancelled.
- Two read-only REST routes, which require at least one of order, tracking number, reference or serial number, so that a shared bench token cannot list the whole shipping history. Writing to the register is deliberately not exposed over REST.
- Two database tables that other plugins may read. Changes to them are additive only, and the contract version is in the option ubac_serials_consignments_api.
The register records what was shipped; it moves no unit itself and talks to no carrier. Two known limits: a cancelled consignment keeps its units, so check its status before counting departures; and “already in another open consignment” is not enforced when two benches act in the same instant, where the status rules stop the second movement instead.
Reading a date out of a serial number
Nothing is read by default, which is the correct answer for a shop whose serial
numbers encode nothing. A scheme for the common shape — first letter the year,
second letter the month, over a twenty-six year cycle — ships with the plugin
and is enabled with one line of code.
Times
Every datetime this plugin stores is UTC, converted to the shop’s timezone when
it is shown.
External services
This plugin does not contact any external service. It makes no outbound request
of any kind, and ships no third-party library.



