I have a wordpress website running WooCommerce with the Flatsome theme by ux-themes.
The product catalog/shop page sorting method is currently "Sort by Latest" I would like to change the way the sort by latest sorts and prioritizes Items based on if they InStock/Out of Stock, Basically push the In Stock items to the front of the out of stock items. I want users to be able to see the In stock first but also see the latest out of stock items. So the Priority is Latest Instock > Oldest In stock > Latest Out of Stock > Oldest Out of stock
This way it shows the latest in stock items THEN the latest out of stock items in order.
In Stock ITEM A date is 01/01/21
Out Of Stock ITEM B date is 02/01/21
Out Of Stock Item C is date 03/01/21
In Stock ITEM D is Data 04/01/21
by the current logic, B & C will be ahead of ITEM A because of their date. However I'd like to prioritize In stock first in the shop lineup, so that way It is Ordered D A C B (D A are in order by date and show first because of their stock status, then C and B are 2nd and ordered by their date aswell.)
This should be a very simple since it is just a filtering/sorting.
I am not sure what the best way to accomplish this is but I would prefer not editing the theme so whatever is the least invasive way of doing this and that is update safe.