2017-04-18 69 views

回答

0

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