Woocommerce 更新客户密码
Woocommerce Update Customer Password
我正在为我的 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 中,我们将看到 Customer properties 包含以下 Attributes :
然而,password
属性是write-only类型,因此它不会显示在 json 响应中。
我正在为我的 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 中,我们将看到 Customer properties 包含以下 Attributes :
然而,password
属性是write-only类型,因此它不会显示在 json 响应中。