Back in June of last year, I released a WordPress plugin: WooCommerce Sort By Stock.
In fact, it was the very first plugin I’d ever written and released on the WordPress Plugin Directory.
I was very excited back then and even wrote a blog post to announce it. If you didn’t get a chance to read that post, I basically described how the plugin would allow anyone using a WooCommerce store to view their products on the backend in order of the stock amount. So they could see which products have the most stock, and see which had none.
But then someone emailed me and said, “Hey, the plugin doesn’t work! It shows stock amounts in this order: 5, 30, 200, 1.”
The problem was that instead of sorting by the value of the actual number, it was sorting it as if it were a string. And by that logic, it is basically ordering by the first string.
So I took some time, fixed it, and released a version 2 that works correctly!
I’m already planning on version 3 to work even more intuitively and work with features such as backorders.
And if you like it (or don’t), please leave me a review here.