Title: WooCommerce Out Of Stock Last
Author: Alcmidia
Published: <strong>☘️4️⃣ 26, 2018</strong>
Last modified: ⛄1️⃣ 25, 2024

---

Search plugins

![](https://s.w.org/plugins/geopattern-icon/woo-out-of-stock-last_8a6f41.svg)

# woo-out-of-stock-last

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

 * [Details](https://emoji.wordpress.org/plugins/woo-out-of-stock-last/#description)
 * [Reviews](https://emoji.wordpress.org/plugins/woo-out-of-stock-last/#reviews)
 * [Development](https://emoji.wordpress.org/plugins/woo-out-of-stock-last/#developers)

 [Support](https://wordpress.org/support/plugin/woo-out-of-stock-last/)

## Description

This plugin has been closed as of 🍂1️⃣0️⃣ 24, 2025 and is not available for download.
Reason: Licensing/Trademark Violation.

## Reviews

![](https://secure.gravatar.com/avatar/22aaa6cecc2318fc92b99e08e96c03079ce23a07f330c914141fd6d7e58fd1aa?
s=60&d=retro&r=g)

### 󠀁[Good but messes also some in stock products](https://wordpress.org/support/topic/good-but-messes-also-some-in-stock-products/)󠁿

 [motmat](https://profiles.wordpress.org/motmat/) ☘️4️⃣ 18, 2023

Messes also some in stock products and moves them from 1st site somewhere to the
middle

![](https://secure.gravatar.com/avatar/98c9d48d34471aa3f7c4f1ae799e60ba4ad3ce909ab037740e7f8b0756701b8b?
s=60&d=retro&r=g)

### 󠀁[Just what I needed](https://wordpress.org/support/topic/just-what-i-needed-1261/)󠁿

 [Gerardo García](https://profiles.wordpress.org/spanibal/) ☘️4️⃣ 3, 2023

Does what it says and that's enough

![](https://secure.gravatar.com/avatar/37caa9d45f492760931f7b30fac60bf54ad3db27bcd2dba6f02be7a7e0551d14?
s=60&d=retro&r=g)

### 󠀁[Do not use this plugin (Working code included)](https://wordpress.org/support/topic/do-not-use-this-plugin-working-code-included/)󠁿

 [Saul](https://profiles.wordpress.org/slightlyfaulty/) 🍂1️⃣1️⃣ 10, 2022

This is a very poor implementation of sorting out of stock products last. Firstly,
the code was blatantly stolen from Business Bloomer without giving credit. More 
importantly, it doesn't just sort out of stock products last, it completely overrides
the sorting of your products, so that selecting "Latest", "Best Sellers", etc. no
longer works. And it doesn't even do that right. It sorts in stock products first,
then products on backorder, and then out of stock products. This was also brought
to the author's attention many months ago by @fightingbettas in a support topic,
which went completely ignored. If you want to do this properly, use something like
this: add_filter('posts_orderby', function($orderby, $query) { global $wpdb; static
$oos_sql; if ($query->is_singular || !$query->is_main_query() || $query->get('wc_query')!
== 'product_query' || is_admin()) { return $orderby; } if ($oos_sql === null) { 
$oos_term = get_term_by('name', 'outofstock', 'product_visibility'); $oos_sql = "{
$wpdb->posts}.ID IN (SELECT object_id FROM {$wpdb->term_relationships} WHERE term_taxonomy_id
= {$oos_term->term_taxonomy_id}) ASC"; } $orderby = $oos_sql . ', ' . $orderby; 
return $orderby; }, 10, 2);

![](https://secure.gravatar.com/avatar/e964768a1ca83d4374ddbfa9d80859748bb40d3d65ac22c1c1074ad67f654e59?
s=60&d=retro&r=g)

### 󠀁[Finally! An easy way to show out of stock items last](https://wordpress.org/support/topic/finally-an-easy-way-to-show-out-of-stock-items-last/)󠁿

 [Steve](https://profiles.wordpress.org/steveggi/) ☘️5️⃣ 16, 2022

This plug-in fixes a problem that WooCommerce has long overlooked: simply moving
out of stock products to the end of store instead of hiding them completely (the
only available Product settings option). There are numerous workarounds involving
editing the functions.php file, but this solution is easier to employ. Works fine
in WordPress 5.9.3 on my client's Avada site.

![](https://secure.gravatar.com/avatar/49029b31d9bea3e68ca92580783fa6ae47825c590042ff522a7fcc521647b5af?
s=60&d=retro&r=g)

### 󠀁[Neat and simple plugin](https://wordpress.org/support/topic/neat-and-simple-plugin/)󠁿

 [Chandra](https://profiles.wordpress.org/naturepinks/) 🍂1️⃣0️⃣ 24, 2021

Does what it says. Open source yet quick support from alcmidia.

 [ Read all 5 reviews ](https://wordpress.org/support/plugin/woo-out-of-stock-last/reviews/)

## Contributors & Developers

“WooCommerce Out Of Stock Last” is open source software. The following people have
contributed to this plugin.

Contributors

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

[Translate “WooCommerce Out Of Stock Last” into your language.](https://translate.wordpress.org/projects/wp-plugins/woo-out-of-stock-last)

### Interested in development?

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

## Meta

 *  Version **2.1**
 *  Last updated **3 years ago**
 *  Active installations **N/A**
 *  Tested up to **6.3.14**
 *  Language
 * [English (US)](https://wordpress.org/plugins/woo-out-of-stock-last/)
 *  [Advanced View](https://emoji.wordpress.org/plugins/woo-out-of-stock-last/advanced/)