Woocommerce更新客户密码

问题描述

我正在为我的iOS应用构建基本的登录/注册页面。

此应用当前通过Woocommerce API连接到我的网站。

https://example.com/wp-json/wc/v3/customers?consumer_key=xxxx&consumer_secret=xxxx

我可以通过API查看所有客户的详细信息和以前的订单,但似乎找不到JSON包(或Woocommerce API文档)中客户密码的位置,以便该应用可以更改客户密码

这是JSON响应的示例:

{
        "id": 29327,"date_created": "2020-07-22T09:53:59","date_created_gmt": "2020-07-21T23:53:59","date_modified": "2020-07-27T08:51:33","date_modified_gmt": "2020-07-26T22:51:33","email": "xxxx","first_name": "xxx","last_name": "xxxx","role": "customer","username": "xxxx","billing": {
            "first_name": "xx","last_name": "xxx","company": "","address_1": "xxx"

任何帮助将不胜感激。

解决方法

WooCommerce document 中,我们将看到客户属性包含以下属性

enter image description here

但是password属性是只写类型,因此 因此不会显示在json响应中。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...