If you hit /wp-json/wp/v2/comments?post=X on a wordpress blog it returns JSON of comments for that post ID. I am able to get results without an issue, but the meta is an empty array instead of having any meta values related to the comment.

I also have tried visiting /wp-json/wp/v2/comments/X to pull an individual comment, but that is also returning an empty meta array.

There is a rating field saved in the wp_commentmeta table and I’m expecting this to be returned so that I can display reviews from woocommerce on a 3rd party site.

Read more here: WordPress API returning empty meta array


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: