SunsetvaneFree, open source

Discontinue the product, keep its history

Sunsetvane adds a Discontinued switch to products. A discontinued product leaves the shop, categories, search and related products and cannot be bought. Its page still opens with a discontinued notice and a link to the replacement, and its reviews and past orders stay as they were.

NameSKUStockPrice
Linen apronAPR-02In stock119.00 PLN
Ceramic mug, matte DiscontinuedMUG-MATTE-01In stock49.00 PLN
Ceramic mug, glossyMUG-GLOSS-01In stock52.00 PLN
Tick Discontinued and the product leaves the shop and cannot be bought. Its page, reviews and past orders stay.
The product stays publishedBlock and classic themesBulk action on the products list

Works with: WooCommerce, Variable products, Block themes, Classic themes, HPOS, Multisite

See it in action

The page still works: a discontinued notice and a replacement link instead of the cart button
The switch and the replacement on the Inventory tab
Label and filter for discontinued products on the list

A deleted product takes its page and reviews with it

The shop deletes an old model, and with it go the page search visitors landed on, its reviews and the link in past orders. Hiding the product in WooCommerce keeps the page, but it can still be bought.

  • ✗ The page from search results ends in a 404
  • ✗ Reviews disappear with the product
  • ✗ A hidden product can still be added to the cart

Sunsetvane discontinues without deleting

  • ✓ The product leaves the shop, categories, search and related products
  • ✓ Buying is switched off and a notice replaces the add-to-cart form
  • ✓ The notice links to a replacement when you pick one
  • ✓ Switching it off restores the visibility the product had

What you get in the free version

The whole plugin, no account and no settings.

The page stays

A discontinued product still opens, with a discontinued notice. Pick a replacement and the notice links to it.

Switch in the product editor

Tick Discontinued on the Inventory tab and choose the replacement from the product search. Works for simple and variable products.

Label, filter and bulk action

The products list shows a label next to the name, filters discontinued products and has bulk actions to mark and bring them back.

Sales stop

The add-to-cart form is gone and WooCommerce refuses an add-to-cart link. A cart that already holds it drops it at the next check.

History unchanged

The status stays Published, so orders, reviews and reports still show the product.

Structured data

The offer on the product page reads schema.org/Discontinued instead of a stock status.

Block and classic themes

On a block theme the notice replaces the add-to-cart block of the single product template. On a classic theme it takes the place of the add-to-cart form in the product summary.

Replacement checked first

The link shows only while the replacement is published and not discontinued itself. Otherwise the notice appears without a link, so it never leads to a dead end.

Variations follow the product

A variable product is switched as a whole, and every variation stops selling with it. A single variation can be picked as the replacement.

Visibility remembered

Discontinuing sets the catalog visibility to Hidden and keeps the value the product had, for example Search results only. Bringing it back restores that value.

Light on the page

The switch is one product meta value, read from the cache WordPress loads with the product. The notice stylesheet loads only on the page of a discontinued product.

A notice you can change

Developers can change the notice through the sunsetvane/notice_html filter, on block and classic themes alike. Its output passes through wp_kses_post.

From install to everyday use

There is nothing to set up.

01

Install

Activate Sunsetvane alongside WooCommerce.

02

Mark a product

Tick Discontinued on the Inventory tab, or use the bulk action on the products list.

03

Pick a replacement

Optionally choose the product the notice should link to.

04

Check the product page

Open the product: the discontinued notice stands where the add-to-cart form was, with the replacement link if you picked one.

05

Find retired products

On the products list set the filter to Discontinued, or use the Discontinued products link on the Plugins screen.

06

Bring it back

Untick Discontinued or use Bring back from discontinued. The product gets its previous visibility back and can be bought again.

Who it is for

Shops whose products end while their pages still get visits.

A new model

The old model leaves the range and a new one replaces it. A visitor from search lands on the old page and goes to the new one in one click.

  • ✓ Replacement link
  • ✓ No 404
  • ✓ Reviews stay

Seasonal range

After the season the range leaves the shop, but its pages and reviews wait for next year. Switching it off restores the visibility it had.

  • ✓ Bulk action
  • ✓ Previous visibility restored
  • ✓ Variable products

A supplier you stop with

Products from a supplier you stop working with leave the range at once, and past orders still link to them.

  • ✓ List filter
  • ✓ Order history
  • ✓ Reports unchanged

Spare parts and accessories

A device is no longer sold, but customers still open its page to check what they bought. The page stays with its description, reviews and a link to the current model.

  • ✓ The page still opens
  • ✓ Description and reviews stay
  • ✓ Link to the current model

Clearing out a large catalogue

Filter the products list, select a page of old items and mark them discontinued in one bulk action. The filter then shows what is retired and what is still for sale.

  • ✓ Bulk action
  • ✓ Filter on the list
  • ✓ Label next to the name

Shops on a block theme

The notice replaces the add-to-cart block of the single product template, so no template has to be edited.

  • ✓ Add to Cart Form block
  • ✓ Add to Cart with Options block
  • ✓ Classic themes too

Support and resources

Every plugin has its own documentation with setup walkthroughs. Bugs and questions go to the public GitHub repository for that plugin, we answer in the open.

Maintenance status

This plugin is maintained. We have announced no end-of-support date, and when we do it will say so here and in a release.

Changelog

Frequently asked questions

How is this different from catalog visibility Hidden?

A hidden product in WooCommerce can still be bought from its page or through a link. Sunsetvane sets visibility to Hidden, switches buying off, shows a notice with a replacement link and adds a label, a filter and bulk actions to the list.

Does it redirect the old page to the replacement?

No. The page stays and links to the replacement, so its reviews and search ranking stay with it.

Can I discontinue one variation?

No, the switch is per product. Set a single variation out of stock or disable it in WooCommerce.

What happens when I switch it off?

The product gets back the visibility it had before and can be bought again.

What is left after uninstalling?

On uninstall the plugin restores the previous visibility of discontinued products and removes its meta values. It creates no options or tables.

Does it require WooCommerce?

Yes, version 8.9 or newer.

Is the product removed from carts that already hold it?

Yes. It can no longer be bought, and WooCommerce removes products that cannot be bought when the cart is checked.

What happens to a direct add-to-cart link?

WooCommerce refuses it, because the product is no longer purchasable.

What do search engines see?

A published page that still opens. Its structured data marks the offer as discontinued (schema.org/Discontinued) instead of in stock or out of stock.

How is this different from out of stock?

Out of stock stops sales too, but keeps the product in the shop unless you hide every out-of-stock item, and tells search engines it is only missing for now. Discontinued means it will not come back.

What if I change the catalog visibility by hand?

The product shows in the shop again but still cannot be bought. Switching Discontinued off and on again sets it back to Hidden.

What if I deactivate the plugin without deleting it?

Discontinued products stay hidden but can be bought again, because the purchase block and the notice come from the plugin.

Which replacement can I pick?

Any other product or a single variation, from the product search on the Inventory tab. The link shows only while the replacement is published and not discontinued itself.

Is there a settings page?

No. Everything sits on the Inventory tab and the products list. The Plugins screen links to the list filtered to discontinued products.

Can I mark many products at once?

Yes, with the bulk actions Mark as discontinued and Bring back from discontinued on the products list. Each product is checked against your right to edit it.

Do orders and reviews still show the product?

Yes. The product stays published, so past orders link to it and its reviews stay on its page.

Does it work with HPOS and the cart and checkout blocks?

Yes, it declares compatibility with both. It does not touch order data at all.

Does the notice match my theme?

It uses the WooCommerce info notice class, so it takes the look your theme gives notices, and screen readers announce it as a status.

Does uninstalling cover products in the trash?

Yes. Uninstall goes through discontinued products in batches of 200, trashed ones included, gives each its previous visibility back and removes the plugin's meta.

Does the list filter slow the products list?

It adds one meta condition to the paged products list query, and only while the filter is set.

What are the requirements?

WordPress 6.5, PHP 8.1 and WooCommerce 8.9 or newer.

Discontinue products without deleting them

The page, reviews and orders stay, the sales stop. All of it in the free edition under GPL.

View on GitHub

The free edition is the whole plugin, with no account and no external services.