Launch pricing: Lock in Pro at $79/yr before prices go up View pricing →

Never ship past-date medicine: expiry and lot tracking for WooCommerce pharmacies

Medicine is dated stock with no margin for error. Every pack carries an expiry date and a lot code, and selling past-date product — or being unable to say which orders received a recalled batch — is the kind of problem an online pharmacy can’t afford. Core WooCommerce wasn’t built for this: it stores one stock quantity per product, with no expiry date, no batches and no lot numbers.

This guide shows how to run expiry and lot tracking properly on a WooCommerce pharmacy, chemist or health store using the free Sellinor Product Expiration Dates for WooCommerce plugin, and what the Pro add-on adds for batch-level traceability. It’s an inventory tool, not medical or regulatory advice — you stay responsible for your own compliance obligations, and the plugin’s job is to make the data behind them accurate and auditable.

Stop selling past-date medicine automatically

The first job is simple: a product that has reached its expiry date should not be purchasable. Set an expiration date on each medicine in the Expiration tab of the product editor — or set them in bulk from the Products list with Quick Edit and Bulk Edit.

Then choose what happens at the date under Products → Expirations → Settings → General. The expiry actions are:

  • Hide from catalogue — the product disappears from shop pages, category listings and search. This is applied immediately on every page load.
  • Set to out of stock — the product stays visible but can’t be added to the cart. This runs on an hourly background check.
  • Both — hidden and unpurchasable, the most thorough option.

You don’t have to wait for the exact date. A days before setting triggers the action a chosen number of days early — useful when you want a buffer so nothing close to expiry slips through. And regardless of the action you pick, cart and checkout protection is immediate: once a product crosses its expiry threshold it can’t be added to the cart or checked out, even in the window before the hourly sweep runs. A near-expiry pack can’t sneak through a cart that was loaded earlier.

Rotate by FEFO so the oldest stock leaves first

Pharmacies receive the same SKU across deliveries with different expiry dates. A single stock number hides which units expire first. Batch tracking in the Pro add-on fixes that: you record each delivery as its own batch with a quantity, an expiration date and an optional batch reference for the lot number.

Stock is then deducted by FEFO — First Expired, First Out. When an order comes in, the plugin fills it starting from the batch closest to expiring, only moving to the next batch when one is exhausted. Nobody picks the lot by hand, and you don’t ship next quarter’s stock while this quarter’s sits behind it. It holds up under real-store conditions:

  • The exact batch (or batches) used are recorded on the order.
  • Refunds and cancellations return units to the correct batch, not a generic pool.
  • Expired batches stop counting toward sellable stock, so they can’t be sold.
  • Deduction runs inside a database transaction, so simultaneous orders don’t double-spend a lot.

Full setup is in the batch & lot tracking docs, and the WooCommerce FEFO guide walks through the rotation logic in more depth.

Trace which orders received a recalled lot

This is the part that matters most for medicine. Because every order records the batch it was fulfilled from, you can work backwards from a lot number to the orders that received it. Turn on Show batches in customer emails and the batch reference and expiry date also appear on the customer’s order confirmation, giving the buyer the same lot detail.

Behind that, the activity log records every batch action — created, deducted (with the order number), adjusted, swapped, expired or deleted — giving you a per-product batch history you can search. If you need to replace a lot already shipped on an open order, a batch swap lets you reassign the allocation on Processing, On-hold or Completed orders, atomically returning stock to the original batch and deducting from the new one, with the swap logged.

See what’s expiring before it expires

You shouldn’t have to open products one by one to know what’s at risk. The free Overview dashboard at Products → Expirations summarises your whole catalogue: how many products you’re tracking, how many are expiring soon, how many have expired, and the value at risk — the stock value tied up in soon-to-expire medicine. A month calendar shows how many products expire on each day, and a WordPress dashboard widget surfaces your soonest-expiring items the moment you log in.

For proactive alerts, Pro adds a scheduled email digest — daily, weekly or monthly — listing products within a threshold you set, with each item’s stock level and days remaining, so you can reorder or pull stock before it lapses.

Where the free line sits

Everything that stops past-date sales is free: per-product and per-variation expiry dates, automatic hide/out-of-stock actions, immediate cart and checkout protection, a frontend date label with a “show within N days” threshold, a sortable product-list column, the Overview reports page with value-at-risk, an activity log, and CSV import/export matched by SKU or ID.

Batch and lot tracking with FEFO, the expiry email digest, and the expiration column in WooCommerce’s native CSV importer are part of the Pro add-on — $79/year for one site or $199/year for unlimited sites, with a 14-day free trial. For a deeper look at lot-level control, see the batch & lot tracking guide.

Frequently asked questions

Does the plugin stop customers buying medicine that has passed its expiry date?

Yes, in the free version. When a product reaches its expiration date — or a configurable number of days before it — the plugin can hide it from the catalogue, set it out of stock, or both. Expired items are also blocked from the cart and automatically removed at checkout, so a product past its date can't be purchased even before the hourly stock sweep runs.

Can I track batch and lot numbers so I can act on a recall?

Yes, with the Pro add-on. You record multiple batches per product, each with a quantity, an expiration date and an optional batch reference for the lot number. The exact batch fulfilled is stored on each order, and with the 'Show batches in customer emails' setting it also appears on the customer's confirmation email — so if a lot is recalled you can identify which orders shipped it. Every batch action is also written to the activity log.

How does the plugin decide which stock to sell first?

It uses FEFO — First Expired, First Out. When an order comes in, stock is deducted from the batch with the earliest expiration date that still has units, only moving to the next batch when one runs out. This rotates your oldest medicine out first without anyone choosing the lot by hand. Refunds and cancellations return units to the correct batch.

What happens if an order needs more units than my batches physically hold?

The plugin will not silently complete an order with stock you don't have. If batch stock is insufficient, the order is placed on hold and an order note lists the affected item, so you can add a batch or adjust the order before fulfilling it. This prevents overselling near-empty lots.

Can different pack sizes of the same medicine have different expiry dates?

Yes. The free plugin lets you set an independent expiration date on each variation, or a parent default that dateless variations inherit. A variable product is only hidden or set out of stock once every variation has expired, so one expired pack size never removes the whole listing.

Is there a free version, and what does Pro cost?

Yes. Core expiry tracking is free: per-product and per-variation dates, automatic hide/out-of-stock actions, cart and checkout protection, an Overview reports page with inventory value-at-risk, and CSV import/export. Batch and lot FEFO tracking, an expiry email digest and automatic expiry discounts are in the Pro add-on, which is $79/year for one site or $199/year for unlimited sites (Agency), with a 14-day free trial.

Put your pharmacy's expiry and lot data on autopilot

Set an expiry date on every medicine, block past-date stock from the cart automatically, rotate by FEFO and trace which orders received any lot — free to start, with Pro batch tracking when you need it.

See plans & download free

Or read the documentation.