Linux 软件免费装
Banner图

PluginCity Product Expiry Dates for WooCommerce

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

标签

expiry date product expiry perishable expiration date best before

下载

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. The date is enforced in both places it has to be: a product past its date cannot be added to a cart, and a cart that already held one cannot be checked out — a cart easily outlives the date it was filled before. The customer is told which product to take out, by name. 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, and an automatic markdown as it approaches. 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.

常见问题:

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. The button belongs to your theme, and a buy form drawn in place of WooCommerce's own is hidden too. If yours 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 leaves the row in place, 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 customer who followed 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, feeds and back-in-stock emails 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 perishable products with a best-before date?

Yes. Type the best-before date on the product's Expiry tab and it stops selling at the end of that day, so perishable food cannot be added to a cart or checked out past it.

Can I stop selling an event ticket once the event has passed?

Yes. Give the ticket a date and time and it stops selling at that minute. A cart still holding it cannot be checked out.

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. The PluginCity product page lists the Pro features in full.

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. The PluginCity product page has the details.

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 and show 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 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, and any other flow that builds its order through WooCommerce's checkout is refused there too.

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.0.2 1.0.1 1.0.0