Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Android中使用woocommerce rest api更改用户密码_Android_Wordpress_Woocommerce Rest Api - Fatal编程技术网

在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

我正在使用woocommerce rest API构建一个电子商务Android应用程序

我想使用woocommerce rest API实现更改密码,我已经参考了这个链接

但它不起作用


如何实现更改密码?

我在使用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)
    })
}