Title: InStock First – Sold Out Products Last for WooCommerce
Author: edenworks
Published: <strong>November 5, 2026</strong>
Last modified: November 5, 2026

---

Search plugins

![](https://ps.w.org/instock-first/assets/banner-772x250.png?rev=3785146)

![](https://ps.w.org/instock-first/assets/icon-256x256.png?rev=3785146)

# InStock First – Sold Out Products Last for WooCommerce

 By [edenworks](https://profiles.wordpress.org/edenworks/)

[Download](https://downloads.wordpress.org/plugin/instock-first.1.0.0.zip)

 * [Details](https://wordpress.org/plugins/instock-first/#description)
 * [Reviews](https://wordpress.org/plugins/instock-first/#reviews)
 *  [Installation](https://wordpress.org/plugins/instock-first/#installation)
 * [Development](https://wordpress.org/plugins/instock-first/#developers)

 [Support](https://wordpress.org/support/plugin/instock-first/)

## Description

Shoppers who land on a category full of “Out of stock” badges leave. **InStock First**
keeps what you can actually sell at the top: in-stock products are shown first and
sold-out products move to the end of the list, without hiding them (so you keep 
their SEO and customers can still sign up for restock alerts).

It works the moment you activate it. There is nothing to configure and nothing to
re-run: the order is applied when the page loads, so a product that comes back in
stock moves straight back up, and a product that sells out drops to the end on its
own.

#### What it does (free, no limits)

 * **Out of stock products last** on the main shop page
 * **Category, tag and attribute archives** (every product taxonomy)
 * **Product search results**
 * **[products] shortcode** lists
 * **Keeps your normal sorting** inside each group: default/custom order, popularity,
   rating, newest, price low to high and high to low all still work
 * **Backorders your way**: treat them as in stock, put them between in-stock and
   sold-out, or treat them as sold out
 * **Variable products** are handled through WooCommerce’s own stock status (a variable
   product is “out of stock” only when all its variations are)
 * **No catalog changes**: it never edits products, menu order or dates, so deactivating
   it puts everything back exactly as it was
 * **Fast**: one indexed join on WooCommerce’s product lookup table, no extra queries
   per product, no cron jobs, no background processing
 * Works with any theme that uses standard WooCommerce product loops
 * HPOS compatible, translation ready, no ads, no tracking

### Privacy

InStock First does not collect, store or send personal data, and it makes no external
requests.

## Screenshots

[⌊A category page before and after: sold-out products move to the end.⌉⌊A category
page before and after: sold-out products move to the end.⌉[

A category page before and after: sold-out products move to the end.

[⌊Settings: WooCommerce → Settings → Products → Sold-out order.⌉⌊Settings: WooCommerce
→ Settings → Products → Sold-out order.⌉[

Settings: WooCommerce  Settings  Products  Sold-out order.

[⌊Your normal sorting (here "price: low to high") is kept inside the in-stock and
sold-out groups.⌉⌊Your normal sorting (here "price: low to high") is kept inside
the in-stock and sold-out groups.⌉[

Your normal sorting (here “price: low to high”) is kept inside the in-stock and 
sold-out groups.

## Installation

 1. Install and activate WooCommerce.
 2. Go to Plugins  Add New, search for “InStock First”, install and activate.
 3. That’s it. Sold-out products now appear last. Optional settings: WooCommerce  Settings
    Products  Sold-out order.

## FAQ

### Does this hide out of stock products?

No. They stay visible, just at the end. If you want to hide them completely, WooCommerce
has a built-in option (WooCommerce  Settings  Products  Inventory  “Hide out of 
stock items from the catalog”).

### Will it change my product order or data?

No. Nothing is written to your products. The order is calculated when the listing
is shown, so deactivating the plugin restores your previous order instantly.

### Does it work with sorting by price, popularity or newest?

Yes. Within the in-stock group and within the sold-out group your chosen sorting
still applies.

### What about products on backorder?

You choose: treated as in stock (default), shown between in-stock and sold-out products,
or treated as sold out.

### Does it work with caching plugins?

Yes. Cached pages update when your cache refreshes, the same as any stock change.

### Does it work with the block editor “Product Collection” block or page builders?

Version 1.0 covers the classic shop, category, tag, attribute and search pages (
including block themes’ product archive templates that use the main query) and the[
products] shortcode. Custom loops can opt in with the `instock_first_applies_to_query`
filter.

### Does the plugin collect any data?

No. The plugin does not collect, store or send any data, and it makes no external
requests.

### Developer hooks

 * `instock_first_applies_to_query` (bool $apply, WP_Query $query): turn reordering
   on or off for any query.
 * `instock_first_rank_cases` (array $ranks): map stock statuses to sort ranks (
   lower is earlier).
 * `instock_first_rank_sql` (string $sql, string $alias, WP_Query $query): replace
   the rank SQL expression.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“InStock First – Sold Out Products Last for WooCommerce” is open source software.
The following people have contributed to this plugin.

Contributors

 *   [ edenworks ](https://profiles.wordpress.org/edenworks/)

[Translate “InStock First – Sold Out Products Last for WooCommerce” into your language.](https://translate.wordpress.org/projects/wp-plugins/instock-first)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/instock-first/), check
out the [SVN repository](https://plugins.svn.wordpress.org/instock-first/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/instock-first/) 
by [RSS](https://plugins.trac.wordpress.org/log/instock-first/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.0

 * First release.

## Meta

 *  Version **1.0.0**
 *  Last updated **5 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.5 or higher **
 *  Tested up to **7.1.4**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [out of stock](https://wordpress.org/plugins/tags/out-of-stock/)[product sorting](https://wordpress.org/plugins/tags/product-sorting/)
   [sold out](https://wordpress.org/plugins/tags/sold-out/)[stock-status](https://wordpress.org/plugins/tags/stock-status/)
   [woocommerce](https://wordpress.org/plugins/tags/woocommerce/)
 *  [Advanced View](https://wordpress.org/plugins/instock-first/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/instock-first/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/instock-first/reviews/)

## Contributors

 *   [ edenworks ](https://profiles.wordpress.org/edenworks/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/instock-first/)