Hey
Have you tried just adding “address”: “value of address here”; ? I don’t know if it will work or why it does not belong to the API. I have used custom fields also some times to get away with this limitation.
This is the code that i use in my custom signup and it works for the registration, so i am sure instead of the wixusers.register you can make it so it will update the record. idk for sure, i thought i saw a post by Code Queen where she had a member page that allowed users to update their information. maybe bridge the two?
import wixUsers from ‘wix-users’; import wixLocation from “wix-location”; import wixWindow from ‘wix-window’;
$w.onReady( function (){
$w(‘#submit’).onClick(() => {
wixUsers.register($w(‘#email’).value, $w(‘#password’).value, {
“contactInfo”: {
“firstName”: $w(‘#firstName’).value,
“lastName”: $w(‘#lastName’).value,
“phoneNumber”: $w(‘#phoneNumber’).value,
“street”: $w(‘#street’).value,
“city”: $w(‘#city’).value,
“state”: $w(‘#state’).value,
“zipcode”: $w(‘#zipcode’).value,
“password”: $w(‘#password’).value
}
}).then(() => {
//Everything went good, user was registered, now going to redirect
console.log(‘user registered successfully’);
wixLocation.to(‘/plans-pricing’);
}). catch ((err) => {
//If there is an error it will not redirect, it will console.log the error
console.log(${err}: Error)
});
I just realized that the parameters for addresses for example is not listed here:
but it is listed here:
I’m going to try to register using the same object but if it doesn’t work, it looks like we can register the member, get their new ID, then update the member.