Expiry actions
Overview
When a product reaches its expiration date, the plugin can take automatic action to prevent expired items from being sold. You configure these actions under Products → Expirations → Settings → General.
Available actions
Hide from catalog
When this action is enabled, expired products are removed from your shop pages, category listings, and search results. The product page itself still exists (so existing links do not break), but customers can no longer browse to it through your store.
This is useful when you want expired products to quietly disappear from your storefront without deleting them.
Set to out-of-stock
This action changes the product’s stock status to “out of stock” when it expires. The product may still appear in your catalog (depending on your WooCommerce visibility settings for out-of-stock items), but customers cannot add it to their cart.
This is a good option if you want expired products to remain visible with an “out of stock” label, which can signal to customers that the item existed but is no longer available.
Both
Select both actions to hide the product from the catalog and set it to out-of-stock. This is the most comprehensive option and ensures expired products are neither browsable nor purchasable.
Days before expiration
You do not have to wait until the exact expiration date to trigger actions. The days before setting lets you specify how many days in advance the action should take effect.
For example, if you set this to 3, products will be hidden or set to out-of-stock three days before their expiration date. This gives you a buffer to avoid selling products that are very close to expiring.
Set this to 0 if you want actions to trigger only on the expiration date itself.
How actions run
The two actions take effect in different ways:
- Hide from catalog is applied immediately. The plugin filters your catalog queries on every page load, so a product disappears from shop pages, category listings, and search results as soon as it crosses its expiry threshold — no background task is involved.
- Set to out-of-stock is applied by an hourly background check (the
edfw_check_expired_productsWordPress cron task). When the scheduled sweep finds products that have reached their expiry threshold, it updates their stock status. This means an out-of-stock change can take up to an hour to appear after a product expires.
Independently of either action, cart and checkout protection is immediate: once a product crosses its expiry threshold (with an expiry action enabled), it can no longer be added to the cart or purchased — even in the window before the hourly sweep runs.
Selling expired batches Pro
When batch tracking is enabled, you have the option to continue selling products even if some batches have expired, as long as at least one batch is still valid.
Setting location
The toggle is at Products → Expirations → Settings → General, independent from the expiry action dropdown above.
How it works
When enabled, products whose only remaining stock is in expired batches stay purchasable, and expired batches count as sellable stock; FEFO (First Expired, First Out) still sells from the earliest-expiring batch first. When disabled, expired batches are removed from a product’s sellable stock, so a product whose only remaining stock is expired shows as out of stock. (FEFO ordering by earliest expiration is always in effect regardless of this toggle.)
See Batch Tracking for more details on FEFO and batch management.