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)


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: