Woo商务休息api为客户提供所有产品

问题描述 投票:1回答:1

我试图使用不记名令牌(使用JWT插件)获取所有产品。使用管理令牌获取所有产品但使用客户令牌时不提取产品数据。

call: /wp-json/wc/v3/products

响应:

{
    "code": "woocommerce_rest_cannot_view",
    "message": "Sorry, you cannot list resources.",
    "data": {
        "status": 403
    }
}

img:click here to see image

wordpress woocommerce wordpress-rest-api woocommerce-rest-api
1个回答
-1
投票

试试这个:

wc-api/v3/products.

wp-json/wc改为wc-api

© www.soinside.com 2019 - 2024. All rights reserved.