运行此请求时,出现无效参数错误。
curl http://localhost/wp-json/wc/v3/customers -u user:pass
错误:
{"code":"rest_invalid_param","message":"Invalid parameter(s): role","data":
{"status":400,"params":{"role":"role is not one of all, administrator, shop_manager, retail, member, wholesale."}}}%
我在
html/wp-includes/rest-api/class-wp-rest-request.php
在我注释掉WP_Error
之后,请求正常运行。停用其他woocommerce插件后,仍然出现此错误。有什么想法吗?
答案 0 :(得分:0)
我找到了解决方案。它正在寻找值为customer
的角色。我删除了创建客户角色后,该错误消失了。