How to add expiration dates to your WooCommerce products
WooCommerce is great at managing stock quantities, but it has no concept of time. There’s no built-in field for a best-before date, no way to stop an expired item from being bought, and nothing that tells you what’s about to go off. If you sell anything perishable — food, supplements, cosmetics, medical supplies — that gap quietly costs you money and risks shipping a customer something past its date.
This guide walks through adding expiration (or best-before) dates to your products with the free Sellinor Product Expiration Dates plugin, then setting up what should happen automatically when a date arrives. Every method below — single product, variations, quick edit, bulk edit, and CSV — is in the free version.
Step 1: Install the free plugin
The plugin is on the official WordPress plugin directory, so installation is the standard flow:
- In your WordPress admin, go to Plugins → Add New.
- Search for Sellinor Expiration Dates.
- Click Install Now, then Activate.
Once active, you’ll see a new Products → Expirations menu. That’s the hub for the Overview dashboard, Activity Log, Import/Export, and Settings. Full details are in Getting started.
Step 2: Add a date to a single product
This is the core action and takes about thirty seconds:
- Open any product under Products → Edit Product.
- In the Product data panel, click the new Expiration tab.
- Pick a date with the date picker.
- Click Update.
That’s it — the date is saved as standard product metadata. Depending on your display settings (covered in Step 5), it can now appear on the product page next to the price.
Step 3: Handle variable products and variations
If a product comes in several sizes or packs with different shelf lives, each variation can carry its own date:
- Open the variable product and go to the Variations tab.
- Expand the variation you want to date.
- Fill in its Expiration Date field.
- Save changes, then Update the product.
There’s a shortcut for the common case where most variations share a date and only one or two differ: set a default date on the parent product (in its Expiration tab). Any variation without its own date inherits the parent’s; variations with their own date keep it. On the storefront, the displayed date updates to match whichever variation the customer selects.
One important behaviour to know: a variable product is only hidden or set out of stock once every variation has expired. As long as one variation is still in date, the product stays available, and any individually expired variation simply becomes unavailable to select. The mechanics are documented under Expiration dates.
Step 4: Set dates in bulk
Opening products one at a time is fine for a handful, but not for a real catalog. You have three faster routes, all from the Products list:
- Quick Edit — click Quick Edit on any product row and set or change its date inline.
- Bulk Edit — tick several products, choose Edit from the Bulk Actions dropdown, and apply one shared date to all of them at once.
- CSV import — for the biggest jobs, go to Products → Expirations → Import / Export.
For CSV, the easiest start is the Download template button, which gives you a file pre-filled with every product and its current date. Edit the dates, save, and re-upload. The import only needs two things per row: an ID or SKU to match the product (ID is checked first, then SKU), and an Expiration date in YYYY-MM-DD format. Leave the date blank to clear a product’s date. Columns are detected automatically — there’s no mapping step — and unmatched rows are simply skipped with a summary at the end.
A quick habit worth keeping: export before a large import so you have a restore point. The full file format and round-trip behaviour for variable products is in Import & export.
Step 5: Decide what happens on expiry
Adding dates is only half the job. The real value is what happens automatically when a date arrives. Configure this under Products → Expirations → Settings → General, where the expiry action has these options:
- Hide from catalog — the product disappears from shop pages, category listings, and search, but its page still exists so existing links don’t break. This applies immediately.
- Set to out of stock — the product can still appear in your catalog (per your WooCommerce settings) but can’t be added to the cart. This is applied by an hourly background check, so it can take up to an hour to show.
- Both — the most thorough option: not browsable and not purchasable.
- Do nothing — the default, leaving you in full manual control.
You don’t have to wait for the exact date, either. The days before setting fires the action early — set it to 3, and products are hidden or set out of stock three days ahead of expiry, giving you a buffer. Set it to 0 to act on the date itself.
Whenever an action other than “do nothing” is selected, the plugin also guards the cart: an expired item can’t be added, and if something expires while already sitting in a customer’s cart it’s removed at checkout with a notice. That cart protection is immediate, even in the window before the hourly out-of-stock sweep runs. More detail lives in Expiry actions.
Step 6: Show the date to customers (optional)
If you want shoppers to see the date, enable frontend display under Settings → General. You can:
- Set the label text — “Best Before”, “Use By”, or “Expires”, whatever fits your products.
- Set a display threshold in days, so the date only shows when the product is within that window. Set it to 0 to always show it.
The date renders near the add-to-cart area using standard WooCommerce hooks, which works on classic and block themes. If your theme uses a fully custom product template and the date doesn’t appear, drop the [edfw_expiration_date] shortcode wherever you want it.
Step 7: Keep an eye on what’s expiring
Once dates are in, the plugin gives you ways to monitor them without opening products. The Products list gains a sortable, colour-coded Expiration column. Your main WordPress Dashboard gets an Expiring products widget. And the Overview tab at Products → Expirations is a full dashboard — summary stats including the inventory value at risk, a filterable product table, and a month calendar showing how many products expire on each day. See Reports & calendar.
Where to go from here
That’s the complete free workflow: add dates however suits your catalog, then let the plugin hide or out-of-stock expired items and protect the cart automatically. It’s enough to stop expired products being sold on most stores.
If you also need to track multiple production batches per product — each with its own lot number, date, and quantity — and have WooCommerce ship the soonest-to-expire stock first, that’s the Pro add-on’s FEFO batch tracking. To see exactly how the date is set, inherited, and displayed across simple and variable products, see the Expiration dates reference. Either way, start with the free install and get your dates in first.
Frequently asked questions
Does WooCommerce support expiration dates out of the box?
No. Core WooCommerce has no field for expiration or best-before dates and no way to act on them. You add the capability with a plugin. The free Sellinor Expiration Dates for WooCommerce plugin adds an Expiration tab to the product editor, a sortable date column to the products list, and automatic actions when a product reaches its date.
How do I add an expiration date to a single product?
Open the product in Products → Edit Product, click the Expiration tab in the Product data panel, pick a date with the date picker, and click Update. The date is stored as standard product metadata and can be shown on the product page with a label like 'Best before' or 'Use by'.
Can I add different expiration dates to product variations?
Yes. Open a variable product, go to the Variations tab, expand a variation, and set its Expiration Date field. You can also set a default date on the parent product that any dateless variation inherits. A variable product is only hidden or set out of stock once every one of its variations has expired.
What happens automatically when a product expires?
You choose the action under Products → Expirations → Settings → General: hide the product from the catalog, set it to out of stock, or both. You can also fire the action a set number of days before the date. When an action other than 'do nothing' is selected, expired items are blocked from the cart and removed at checkout. The default is 'do nothing', which leaves you in full manual control.
Can I set expiration dates in bulk instead of one product at a time?
Yes. Use Quick Edit on any product row to set a date inline, or select several products and use Bulk Edit to apply one date to all of them. For larger catalogs, the plugin's Import / Export page imports dates from a CSV matched by product ID or SKU (ID is checked first) in YYYY-MM-DD format.
Is the expiration dates plugin free?
Yes. The core plugin is free and covers a single expiration date per product or variation, automatic expiry actions, cart and checkout protection, frontend display, a sortable products column, a dashboard widget, an Overview reports page with a calendar, and CSV import/export. A separate Pro add-on adds batch and lot tracking with FEFO, automatic discounts, and email digests.
Start tracking expiration dates for free
Install the free Sellinor Expiration Dates plugin from WordPress.org and set your first best-before date in a couple of minutes.
See plans & download freeOr read the documentation.