I am using woocommerce rest API to build an e commerce Android application.
I want to implement the change password using woocommerce rest API ,I have refer this link
https://woocommerce.github.io/woocommerce-rest-api-docs/ but it is not working.
How I can implement change password?
I had the same problem using Ionic3 for building an App with woocommerce as backend.
The following code worked for me, but you need to find a way to figure out the customer 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)
})
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With