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

Show shoppers exactly when a product is best before — right on the product page

Shoppers buying anything perishable — food, supplements, cosmetics, pet treats — want to see a date before they add it to the cart. WooCommerce has no field for that out of the box, and even once you store a date somewhere, getting it to render cleanly on the product page is a separate problem. This guide shows how to display the expiration or best-before date on your WooCommerce product page, choose the label customers read, control when it appears, and place it anywhere in a custom template — all with the free Sellinor Product Expiration Dates plugin.

Set the date, then turn on the display

Once the plugin is active, every product gets an Expiration tab in the Product data panel. Open a product, pick a date, and save — that single date is stored as standard product metadata. Setting a date is covered in full in Getting started.

By itself, the stored date is admin-only. To show it to customers, go to Products → Expirations → Settings → General and enable frontend display. With that on, a label and date appear near the add-to-cart button on the product page. The plugin renders it using your theme’s standard WooCommerce hooks, which means it works on classic themes, block themes, and most customized themes — they keep WooCommerce’s add-to-cart templates even when they rebuild the rest of the page. No template editing required for the common case.

The date displays in whatever format you’ve set under Settings → General in WordPress, so a US store shows month-first and an EU store day-first without any extra configuration.

Choose the label customers see

The plugin doesn’t force a word on you. Under the same General settings, set the label text that sits in front of the date. Common choices:

  • Best Before — for quality dates on shelf-stable food, supplements and dry goods.
  • Use By — for safety-critical perishables that shouldn’t be sold past the date.
  • Expires — a clear catch-all many stores prefer for cosmetics, batteries or vouchers.

There’s no separate “best-before field” versus “use-by field” to manage — you store one date and pick the label that’s honest for what you sell. The wording you choose matters for both customer trust and, in some categories, compliance; the best-before dates guide breaks down when each term is appropriate.

Control when the date appears

Sometimes you want the date on every product all the time. Sometimes you only want it surfaced when a product is genuinely close to its date — most of your stock might be months out, and a date far in the future can read as clutter or even discourage a sale.

The display threshold handles this. It’s a number of days: the date appears on the product page only when the product is within that window of its expiration. Set it to 0 to always show the date. Set it to 30 and the date stays hidden until an item is within a month of expiry, at which point it appears automatically.

This is one of several independent “days” settings in the plugin, and it’s worth keeping them straight. The display threshold only governs what shoppers see on the product page. It’s separate from the expiring-soon threshold (which drives the reports and the dashboard widget) and from the days-before setting (which controls how early an expiry action fires). You can, for example, flag products as expiring soon 30 days out in your admin reports while only showing the date to customers in the final 7 days. Full detail is in Expiration dates.

Variations show their own date

On a variable product, each variation can carry its own date, and any variation without one inherits a default date set on the parent product. On the storefront, the displayed date updates as the shopper selects a variation — pick the 1L bottle and you see its date, switch to the 250ml and the date changes to match. This is exactly the behavior you want when different sizes or packs of the same line have different shelf lives. There’s a dedicated walkthrough in the variation expiration dates guide.

Place the date anywhere with the shortcode

Most themes show the date automatically through the WooCommerce hooks described above. But if your theme or page builder uses a fully bespoke product template — and some custom builds strip out the standard add-to-cart hooks — the automatic placement may not appear. That’s what the [edfw_expiration_date] shortcode is for.

Drop it into a page-builder widget, a block, or a custom template, and the date renders exactly where you put it. The shortcode is deliberately flexible:

  • It renders even when the display toggle is off, because placing the shortcode is itself an explicit instruction to show the date.
  • It accepts an optional id attribute[edfw_expiration_date id="123"] — so you can show a specific product’s date off the product page entirely, for example in a landing page or a custom block.
  • It automatically suppresses the plugin’s own automatic placement on that product’s page, so the date never appears twice even if frontend display is also enabled.

Your label text and display threshold settings still apply to the shortcode output, so the date you place manually behaves consistently with the rest of your store.

Showing the date is half the job

Displaying a clear date builds trust, but it doesn’t stop someone buying a product that’s already past it. The same settings screen lets you choose an automatic expiry action — hide the product from the catalog, set it to out of stock, or both — and whenever an action is enabled, the cart and checkout are protected so expired items can’t be purchased. See Expiry actions for how that works.

For a store that sells perishables, the combination is what you want: customers see an honest date on the product page in the label and format you chose, and the moment that date passes, the store quietly stops selling the item. Setting dates, the custom label, the display threshold, and the shortcode are all in the free plugin — see the food and grocery expiry dates guide for a category-specific walkthrough.

Frequently asked questions

How do I display an expiration date on a WooCommerce product page?

Install the free Sellinor Product Expiration Dates plugin, set a date on the product's Expiration tab, then enable frontend display under Products → Expirations → Settings → General. The date renders near the add-to-cart area using your theme's standard WooCommerce hooks, so it works on classic and block themes without any code.

Can I change the label shown before the date?

Yes. Under Products → Expirations → Settings → General, set the label text to whatever fits your products — 'Best Before', 'Use By', 'Expires', or your own wording. The plugin stores one date per product and you decide which word sits in front of it.

Can I show the date only when a product is close to expiring?

Yes. Set a display threshold (a number of days) and the date appears on the product page only when the product is within that many days of expiry. Set it to 0 to always show the date. This is separate from the expiring-soon threshold used in reports and the dashboard widget.

What if my theme or page builder doesn't show the date automatically?

Use the [edfw_expiration_date] shortcode to place the date exactly where you want it. It renders even when the display toggle is off, accepts an optional id attribute for use outside a product page, and automatically suppresses the plugin's own placement so the date never appears twice.

Does the date update when a customer picks a variation?

Yes. On a variable product, the displayed date updates to match the selected variation. A variation without its own date shows the default date set on the parent product. The displayed format follows your WordPress date setting under Settings → General.

Do I need a paid plan to show expiration dates to customers?

No. Setting a date per product or variation, the custom label, the display threshold, the shortcode, and automatic expiry actions are all in the free plugin. The Pro add-on adds batch and lot tracking with FEFO, automatic discounts as the date nears, and scheduled email digests.

Put the expiration date in front of every shopper

Add a date to any WooCommerce product, choose the label customers see, and display it on the product page automatically — or place it anywhere with a shortcode. Free.

See plans & download free

Or read the documentation.