Problem with sorting SKUs
-
In the WordPress dashboard, under the All Products section in WooCommerce,
when I click on Sort by SKU to sort my products accordingly, there’s a problem:It shows in-stock products first, and out-of-stock products are pushed to the bottom.
As a result, the sorting isn’t accurate.
For example, instead of sorting like:1 - 2 - 3 - 4 - 5 - 6
it ends up as:1 - 3 - 6Because products like 2, 4, and 5 are out of stock, they don’t show up in the correct SKU order, which breaks the expected sequence.
Do you think there’s a setting somewhere causing this behavior?
Or is there a way to configure it so that all products—whether in stock or out of stock—are included in the SKU sorting?
https://example/wp-admin/edit.php?post_type=product&orderby=sku&order=asc
The link also clearly shows that the sorting is only based on SKU,
so it’s basically saying that nothing else is being considered.
But then why are in-stock products listed first, and out-of-stock ones sorted afterward?
The topic ‘Problem with sorting SKUs’ is closed to new replies.