Stop selling expired stock in your WooCommerce food store
Selling food and groceries online adds a problem most WooCommerce stores never face: your stock has a clock on it. A tin of tomatoes, a tub of yoghurt, a bag of coffee — each one becomes unsellable on a specific date, and core WooCommerce has no idea that date exists. It tracks one stock number per product and nothing about when that stock goes off. So the work of watching dates, pulling expired lines, and clearing short-dated stock falls on you, manually, every single day.
This guide covers how to manage best-before and expiry dates on a WooCommerce food or grocery store with the Sellinor Product Expiration Dates plugin — from a single date per product up to batch-level rotation across multiple deliveries.
Put a date on every product
The free plugin adds an Expiration tab to the WooCommerce product editor. Open any simple product, pick a date, and save — that’s the whole setup. For a grocery catalogue with hundreds of SKUs, you won’t do that one at a time: use Quick Edit and Bulk Edit from the product list, or import dates in bulk from a spreadsheet (more on that below).
Most grocery stores don’t want the words “expiration date” facing customers. You control the label shown on the storefront, so you can render it as Best before, Use by, or Expires to match the convention for that product. You can also set a display threshold so the date only appears when an item is, say, within 30 days of its date — and drop the [edfw_expiration_date] shortcode anywhere your theme needs it. See setting and displaying expiration dates for the full set of display options.
Handle sizes and flavours with variations
Grocery products are full of variants: a sauce in 250ml and 500ml, a snack in four flavours, a multipack and a single. Each variation gets its own expiration date, and a shopper selecting a variation sees that variation’s date update on the page.
To avoid dating every variation by hand, set a default date on the parent product. Variations without their own date inherit it; the one or two that differ get their own. And the pulling logic is variant-aware: a variable product is only hidden or set out of stock once every variation has expired. While at least one size or flavour is still in date, the product stays live and only the expired variation becomes unselectable — so you never lose a whole listing because one pack size lapsed.
Pull expired stock automatically
This is where the plugin earns its place in a food store. Under Products → Expirations → Settings, choose what happens when a product reaches its date:
- Hide from catalog — it disappears from shop, category, and search pages immediately.
- Set to out of stock — it stays visible but can’t be bought.
- Both — hidden and unpurchasable.
You can also fire the action a set number of days early — useful when you want a buffer so nothing sells in its final day or two. Whichever action you pick, cart and checkout protection is immediate: an expired item can’t be added to the cart, and if something expires while it’s sitting in a customer’s basket it’s removed at checkout with a notice. No one completes a purchase of out-of-date food. The mechanics — including which action runs instantly versus on an hourly sweep — are documented in expiry actions.
See what’s expiring across the whole catalogue
The free Overview page (under Products → Expirations) is your daily check. It shows how many products have dates, how many are expiring soon, how many have already expired, and the value at risk — the stock value of everything inside your expiring-soon window — so you can see the money tied up in soon-to-go stock. A month calendar marks how many products expire on each day; click a day to list exactly those products.
There’s also an Expiring products dashboard widget so the soonest dates greet you when you log in, plus a sortable Expiration column on the product list with a filter for expiring or expired items. Full tour: reports and calendar.
Import your dates from a spreadsheet
If you already keep delivery dates in a spreadsheet, you don’t need to retype them. The free plugin has a dedicated Import / Export page: download a template pre-filled with every product and its current date, edit the column, and re-upload. Rows are matched by product ID or SKU, columns are detected automatically, and a blank date clears a product’s date. See import and export for the CSV format. (Pro additionally adds an expiration column to WooCommerce’s own native product importer/exporter, if that’s already part of your workflow.)
Rotate by batch with FEFO (Pro)
A real grocery store rarely has one date per product — it has several open lots of the same SKU from different deliveries. The Pro add-on handles this with batch tracking: record multiple batches per product, each with a lot number, quantity, and expiration date.
Orders then deduct stock using FEFO — First Expired, First Out. When a customer buys, the plugin pulls from the batch closest to expiring first, moving to the next batch only when one runs out. The exact batch used is written onto the order and included in the customer’s confirmation email, and refunds or cancellations return stock to the right batch. This is the difference between selling your oldest stock first and watching it expire behind a newer delivery. The full mechanics — including how stock stays in sync and what happens when batches run short — are in batch and lot tracking, and the reasoning behind the method is covered in our FEFO for WooCommerce guide.
Clear short-dated stock before it’s a write-off
Even with good rotation, some stock gets close to its date with units left. Rather than write it off, the Pro add-on applies automatic tiered discounts by days until expiry — for example 10% off at 14 days, 25% at 7 days, 50% at 3 days. The discount escalates on its own as the date approaches and flows through sale badges, the cart, and order totals. An optional “Expiring soon” badge highlights these deals on shop and product pages, turning soon-to-expire stock into a clearance offer instead of a loss. Details and example tiers: automatic discounts.
To stay ahead of it all, Pro also sends a scheduled email digest (daily, weekly, or monthly) listing products approaching their date, with current stock and days remaining — so you can reorder, promote, or pull lines without living in the dashboard. See email notifications.
Where to start
Begin free: add dates to your fastest-moving perishables, set an expiry action with a few days’ buffer, and watch the Overview page for a week. When one date per product stops being enough — when you’re juggling multiple deliveries of the same SKU and want them rotated and discounted automatically — add Pro for batch tracking, FEFO, and short-date discounts. Both run side by side on the same store.
Frequently asked questions
How do I add best-before or expiry dates to WooCommerce products?
Open a product in WooCommerce, go to the Product data panel and click the Expiration tab, then pick a date. Variable products can have a date per variation, and variations without their own date inherit a default you set on the parent. You can also set dates in bulk using Quick Edit, Bulk Edit, or a CSV import.
Can WooCommerce automatically hide or stop selling expired food items?
Yes. The Sellinor plugin can automatically hide an expired product from your catalog, set it to out of stock, or both — either on the expiration date or a set number of days before. Expired items are also blocked from the cart and removed at checkout so no customer can buy them.
What is the difference between a best-before date and an expiry date here?
The plugin stores one date field per product (or batch); you choose the wording shown to shoppers with a custom label such as 'Best before', 'Use by', or 'Expires'. The behaviour is the same — only the label changes — so you can match each store section's convention.
How do I sell short-dated grocery stock before it expires?
The Pro add-on applies tiered percentage discounts based on days until expiry — for example 10% off at 14 days, 25% at 7 days, 50% at 3 days — automatically, with an optional 'Expiring soon' badge on shop and product pages. The discount updates as the date gets closer and flows through cart and order totals.
Can I rotate grocery stock by expiry date across multiple deliveries?
Yes, with Pro batch tracking. Each product can hold multiple batches, each with its own lot number, quantity, and expiration date. Orders automatically deduct from the soonest-to-expire batch first (FEFO), the exact batch is recorded on the order and customer email, and refunds return stock to the correct batch.
Does this work for variable products like different sizes or flavours?
Yes. Each variation can carry its own expiration date, and variations without one inherit the parent's default date. A variable product is only hidden or set out of stock once every variation has expired — as long as one size or flavour is still in date, the product stays available and only the expired variation becomes unavailable to select.
Put your grocery store's expiry dates on autopilot
Track best-before dates per product and per variation, pull expired items automatically, and rotate stock by FEFO with batch tracking.
See plans & download freeOr read the documentation.