在Android中使用woocommerce rest api更改用户密码
我正在使用woocommerce rest API构建一个电子商务Android应用程序 我想使用woocommerce rest API实现更改密码,我已经参考了这个链接 但它不起作用在Android中使用woocommerce rest api更改用户密码,android,wordpress,woocommerce-rest-api,Android,Wordpress,Woocommerce Rest Api,我正在使用woocommerce rest API构建一个电子商务Android应用程序 我想使用woocommerce rest API实现更改密码,我已经参考了这个链接 但它不起作用 如何实现更改密码?我在使用Ionic3构建以woocommerce为后端的应用程序时遇到了同样的问题 下面的代码适用于我,但您需要找到一种方法来计算客户id updateCustomer(){ this.customer.id=YOUR_CUSTOMER_ID; this.customer.p
如何实现更改密码?我在使用Ionic3构建以woocommerce为后端的应用程序时遇到了同样的问题 下面的代码适用于我,但您需要找到一种方法来计算客户id
updateCustomer(){
this.customer.id=YOUR_CUSTOMER_ID;
this.customer.password = NEW_PASSWORD;
this.WooCommerce.putAsync("customers/" + this.customer.id, {customer: this.customer}).then((res)=>{
if(JSON.parse(res.body).customer){
console.log('customer updated');
}
}, (err)=>{
console.log(err.body)
})
}