Change user password with woocommerce rest api in Android

I am using the woocommerce rest API to create an Android e-commerce application.

I want to implement a password for change using the woocommerce leisure API, I link to this link

https://woocommerce.imtqy.com/woocommerce-rest-api-docs/  but it does not work.

How can I implement a password to change?

+4
source share
1 answer

I had the same problem using Ionic3 to create an application with woocommerce as a backend.

The following code worked for me, but you need to find a way to determine the client 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)
    })
}
0

Source: https://habr.com/ru/post/1675011/


All Articles