Linux 软件免费装
Banner图

PluginCity Product Expiry Dates for WooCommerce

开发者 plugincitywp
更新时间 2026年10月26日 06:31
PHP版本: 8.1 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

expiry date product expiry perishable expiration date best before

下载

1.1.0 1.0.2 1.0.0 1.0.1

详情介绍:

Some things should not be sold after a certain date: food has a best-before date, a licence or a warranty covers a fixed period, and an event ticket is worthless the morning after. WooCommerce has no way to say so. PluginCity Product Expiry Dates for WooCommerce adds an Expiry tab to every product with one box on it: the date it can no longer be sold after. When that moment passes the product comes off sale on its own, and a cart that already held it cannot be checked out. What you get The free version is permanent. It does not expire, needs no licence key, and never contacts PluginCity. Pro Not every product goes off all at once, and not everyone who buys from you is a retail customer. Pro is for shops that need the exceptions: trade accounts that may still buy cleared stock, a shelf life that dates products for you, dates per variation and in bulk, a warning before a date passes, an automatic markdown as it approaches, and a block and an Elementor widget for the expiry display. Pro is a separate paid version, sold and distributed by PluginCity. It is not included in this plugin and is not downloaded or installed by it, and nothing described above depends on it. Your dates and settings carry over if you buy it.

安装:

WooCommerce must be installed and active first.
  1. In WordPress, go to Plugins → Add New.
  2. Search for PluginCity Product Expiry Dates for WooCommerce.
  3. Click Install Now, then Activate.
  4. Go to WooCommerce → Product Expiry, or click Settings on the Plugins screen.
From a downloaded ZIP instead: Plugins → Add New → Upload Plugin, choose the file and click Install Now. There is no need to unzip it.

屏幕截图:

  • The Expires column on your products list. Every date in the shop on one screen, with whatever has already stopped selling marked.
  • A product whose date has passed. The Add to cart button is gone and your own sentence stands where it was.
  • A cart holding something that has since gone off. The product is named at the top, the shop's own message sits with the totals, and the order will not go through until it comes out.
  • The same cart at the checkout. A customer who comes straight to this page is refused here too, so an expired product cannot be paid for by skipping the cart.
  • The two sentences a customer reads are yours to write, and %s is where the products get named.

升级注意事项:

1.1.0 Adds a shortcode option that shows a product's expiry date. Nothing changes until you use it.

常见问题:

How do I stop selling a product after a date?

Type the date on the product's Expiry tab. When it passes, the product comes off sale: the buy button goes and the page says it is no longer available, in your words. Anybody holding it in a cart is asked to remove it before ordering. Orders already placed are untouched.

My theme still shows an Add to cart button. What now?

Nothing can be bought through it: the date is checked again when anything is added to a cart, rather than trusted from the page. If the button is still there, tell us the theme and we will look at it.

Why is an expired product still sitting in the customer's cart?

WooCommerce would take it straight out and say only that it can no longer be purchased, which reads as a fault in your shop. This plugin explains it in your words and refuses the order until the customer removes it.

Is an expired product hidden, or marked out of stock?

Neither. It stays listed, so a link lands on a page that explains itself rather than a 404, and nothing can be bought from it. It is not marked out of stock either, which would tell your reports and feeds something untrue.

Can I set a time as well as a date?

Yes. Leave the time empty and the product sells to the end of the day you typed, as a best-before date reads. Fill it in and it stops at that minute.

Can I use it for best-before dates or event tickets?

Yes. Type the best-before date and the product stops selling at the end of that day, so perishable food cannot be added to a cart or checked out past it. Give an event ticket a date and time and it stops at that minute.

What time zone are the dates in?

Yours, the one set in Settings → General. A date you typed stays the moment you meant if you later change the time zone.

Can an expired product be hidden or unpublished instead of just unbuyable?

Not in the free version, which leaves it in the shop and refuses the sale. Pro can hide it from your listings or move it to draft instead.

Can different types of product have different shelf lives?

Not in the free version. Pro dates products for you from one figure for the shop, or a different number of days for each category — days for salad, years for tins.

Can I discount something automatically as its date gets closer?

Not in the free version, which leaves your prices alone. Pro can take a percentage off as the date approaches — 20% in the last week, 50% in the last two days — so stock clears instead of being thrown away.

Can I be warned before a date passes, rather than finding out afterwards?

Not in the free version, which says nothing beforehand. Pro adds a dashboard panel listing what stops selling in the next few days, and can email you the same list each morning.

Can I set dates on a lot of products at once?

Not in the free version, which gives you one date box per product. Pro adds Quick Edit, Bulk Edit and expiry dates in WooCommerce's own product CSV export and import.

Do variations have their own dates?

Not in the free version, where every variation is held to the product's one date. Pro dates each variation separately, and tells a customer who picks one whose date has passed.

Does it work with the block cart and checkout?

Yes. A cart holding something past its date is reported through WooCommerce's Store API, so the block cart and checkout refuse to proceed with the same message.

Can I change the wording?

Yes, both sentences: the one on the cart and the one on the product. Bold, italics and links are allowed; anything else is stripped before it reaches the storefront.

Can I change how the message looks?

The free version draws it one way: a panel with a coloured band and a small clock, taking its type and size from your theme, and it can be restyled with your own CSS. Pro adds controls for colour, box, mark, weight, size and alignment, with a preview.

Can I show the cart message somewhere else on my site?

Yes. The shortcode [pexp_message] prints the same sentence wherever you put it, and shows nothing while the cart is fine.

Can I show a product's expiry date on the page?

Yes. [pexp_message show="product"] prints "Available until" and the date for the product it sits on, or your own sentence once the date has passed, and nothing for a product with no date. Add product="123" to name a product, date="no" to leave the date out, and align="start", "center" or "end" to place it. A block and an Elementor widget for the same display are part of Pro.

Can a customer get past it with a one-tap payment button?

No. The buttons stay on the cart so the customer can read why, but the order is refused while the cart holds something past its date. A PayPal express button is stopped the moment it is pressed, before the customer is sent out to PayPal.

Does it work with High-Performance Order Storage?

Yes. Nothing is written to orders, so HPOS shops are fully supported.

What happens if I deactivate WooCommerce?

The plugin steps aside and shows a notice. It does not fatally error, and your dates and settings are waiting when WooCommerce comes back.

更新日志:

1.1.0 1.0.2 1.0.1 1.0.0