how to sort wordpress get comments call by meta value


Staff member
Beginning wordpress developer here. I have written my own voting system which essentially assigns a integer to every comment's meta key. The key is byc_votes. In the code below, I am calling a post's comments like this:

$comments = get_comments(array(
                            'post_id' => get_the_ID(),
                            'status'  => 'approve', 
                            'order'   => 'DESC',
                            'orderby' => 'byc_votes'

What was hoping to accomplish is to sort the comments by the number of votes they have (the total vote number can be positive or negative). However, this sort does not seem to be working. Instead, wordpress is doing the default sort (by date). All help is appreciated, thanks in advance.