Woocommerce number of sales custom ranking

hi

i’m using algolia plugin Version 1.7.0 and i’m using the plugin for the product search in woocommerce.
now ii would like to sort the search result by number of sales.

i checked this site:
https://www.algolia.com/doc/guides/search/instant-search/#custom-ranking

but i’m not able to find out how to solve this problem to sort my search results by number of sales.

can anybody help?

i was able to xi it with this info:

just use:
get_post_meta( $product->id, ‘total_sales’, true );

instead of visits

This GitHub issue might also help you :wink: