BatchTrack — Product Expiry & Batch Number Manager for WooCommerce.
FIFO enforcement. Race-safe allocation. One-click recall. Auto-discount near expiry. Full compliance audit log. Built for food, pharma, cosmetics, and manufacturing — not as an afterthought.
Built for four industries where batches matter.
FIFO rotation, recall readiness.
Sell products with shelf life and regulatory obligation to rotate stock correctly. Oldest batch always allocated first. Recall mode surfaces every order with a specific batch in seconds. Daily sweep auto-hides products when all batches expire.
Full batch traceability.
Immutable audit log records every batch action — created, allocated, adjusted, expired, recalled, released. Recall page produces affected-order list your quality team needs. Order confirmation and order details show the batch number shipped.
Shelf-life enforcement.
Blocks sale of expired batches automatically. Auto-discount scales price linearly as expiry approaches — recover margin on near-expiry stock instead of writing it off. Discount cap admin-controlled.
Lot tracking, supplier traceability.
Capture batch number, manufacture date, supplier at goods-in via CSV. Track stock across batches per product. Freshness badge (color-coded by days to expiry) reduces support questions.
Eight features. Engineered, not bolted on.
When a customer adds to cart, BatchTrack identifies oldest non-expired batch and reserves it. At checkout, allocation committed using a guarded UPDATE — only succeeds if batch still has quantity ≥ ordered. Two customers ordering last 10 units simultaneously cannot both succeed. Race conditions handled at the database level.
Each batch carries: batch number, expiry date, manufacture date, supplier, location, status, per-batch quantity. Assignable at product level for simple products, variation level for variable. Additional fields captured at import and editable in per-product panel.
One click flags a batch as recalled, blocks sales, generates complete list of orders containing items from that batch. CSV export for quality/compliance. Release workflow allows reinstatement with reason. Every action captured in immutable audit log.
Configurable window: ‘apply when < 30 days to expiry.’ Discount scales linearly from 0% at window start to your configured maximum at expiry. Max % capped by admin. Applied at cart calc, shown as line-level discount.
Color-coded badge on product pages: green >30d, amber <30d, red expired. Thresholds configurable. Template theme-overridable — drop a freshness-badge.php into your theme. Hidden when all batches expired.
Bulk batch creation via CSV: batch number, expiry, manufacture, supplier, location, quantity, SKU. Malformed rows rejected with per-row error message. Export produces CSV of all batches with quantities and status.
Every batch action: action type, batch ID, product ID, quantity change, user ID, timestamp, optional reason. Non-deletable by design — append-only. Viewable and filterable in admin. CSV-exportable for compliance documentation.
HPOS-native from day one — order touches via WC HPOS-safe CRUD. Full Cart and Checkout Blocks compatibility. Custom DB tables for batches and logs — no meta table storage that degrades at scale.
Quick answers.
Does it work with variable products?+
Yes. Batches are assignable at variation level. FIFO resolves the correct batch per variation independently.
What happens when a batch expires during an active cart session?+
Daily expiry sweep marks expired batches. At checkout, allocation query checks batch status — expired batches won’t allocate even if they were in cart. Customer is prompted if no valid batch remains.
Can I manage batches for products I don’t manufacture?+
Yes. The workflow is designed for received goods, not just manufactured. Capture batch number, expiry, supplier, location at goods-in via CSV or per-product panel.
Does recall affect orders already shipped?+
Recall blocks future sales of the recalled batch. Already-shipped orders are surfaced in the affected-order list for your quality team. BatchTrack does not cancel or refund shipped orders automatically — your team acts based on internal recall procedure.
Does it integrate with NetSuite?+
BatchTrack and NetSuite Integration Basic/Pro are independent in v1.0.0. If you need batch numbers pushed to NS lot/serial fields, contact us — candidate for a future BatchTrack Pro or custom plugin.
PHP and WooCommerce versions?+
PHP 8.0 minimum. WC 7.9 minimum. Tested up to WP 6.9 and WC 9.8.
Is the audit log exportable for regulatory inspection?+
Yes. CSV-exportable from admin. Append-only — entries cannot be edited or deleted. Records every batch action with timestamp, user ID, and reason. Satisfies most regulatory traceability requirements. For specific frameworks (FDA, EU GMP) consult your compliance advisor — we make no regulatory compliance guarantees.
Stock rotation and recall readiness in one plugin.
Get the launch notice for BatchTrack.
Drop your email. We’ll send one notice the moment checkout is live — usually a few days’ heads-up. No marketing emails. No drip sequences.