[英]Get Woocommerce product reviews via rest api
I tried to get product reviews with rest api but I got an error woocommerce_rest_cannot_view
我尝试使用 rest api 获取产品评论,但出现错误
woocommerce_rest_cannot_view
https://example.com/wp-json/wc/v3/products/reviews?product=ID
I don't know where is the problem我不知道问题出在哪里
In some how it was an issue on woocommerce api在某些方面,它是 woocommerce api 的一个问题
I edited the class-wc-rest-product-reviews.php我编辑了 class-wc-rest-product-reviews.php
$prepared_args['type'] = 'review';
changed review to comment and it works将评论更改为评论并且有效
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.