WooCommerce custom sort (multiple condition)

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.

Any solution?

Read more here: WooCommerce custom sort (multiple condition)

Leave a Reply

Your email address will not be published. Required fields are marked *