update and read customer phone number, company name and VAT number
This commit is contained in:
@@ -68,6 +68,7 @@ export const saveProfileInfo = (idUser, profile) => {
|
||||
data: {
|
||||
'first_name': parsedFullName[0],
|
||||
'last_name': parsedFullName[1],
|
||||
'phone': profile.phone
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
@@ -90,9 +91,12 @@ export const saveCompanyInfo = (idUser, companyInfo) => {
|
||||
return dispatch => {
|
||||
dispatch(requestSaveCompany());
|
||||
return client.fetch({
|
||||
url: `${API_SERVER}/profileSettings/api/saveCompanyInfo`,
|
||||
method: 'post',
|
||||
data: {companyInfo: JSON.stringify(companyInfo)}
|
||||
url: `${API_SERVER}/wp-json/wc/v2/customers/${idUser}`,
|
||||
method: 'put',
|
||||
data: {
|
||||
vatCode: companyInfo.vatCode,
|
||||
companyName: companyInfo.companyName
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
if(response.data && response.data.messages){
|
||||
|
||||
Reference in New Issue
Block a user