I am trying to sort products on woocommerce in the following conditions:
- unavailable products goes down
- rest of products should be ordered randomly
I tried several ways, but the problem is that randomizing first would be lost after availability order, availability first would be lost after randomizing.
Read more here: WooCommerce custom sort (multiple condition)