During Covid I wrote my own hotel reservation app in Velo. It was a huge project, took me 1.5 years. It used wix-users, which is now deprecated. I’m investigating how to move to wix-members. I remember that at the time of introduction, there were docs available how to migrate (e.g. how to replace IsLoggedIn). Can’t find them any more. Can anybody help recovering these docs?
There is no specific migration guide and the documentation for wix-users does not exist anymore. To see who is logged in you would use currentMember → getMember
https://dev.wix.com/docs/velo/api-reference/wix-members-frontend/current-member/get-member
Do take a look at wix-members v2 as well, it’s in developer preview right now but that will be the next evolution.
https://dev.wix.com/docs/velo/api-reference/wix-members-v2/members/introduction
As far as migrating, wix users will continue to work. It is deprecated but not to be removed so you can certainly update as it makes sense for your site.
Thanks. I will just have to figure it out then, the migration. I’m quite sure there was some migration note once, but maybe that was on the, now defunct, Slack Masters channel.
2 questions:
1: when you migrate to wix-members, what happens to the wix-user data (username pw). Do they get automatically converted or do you have to start from scratch?
2: I saw that v2-stuff, but I wondered what it would replace, since wix-members has a frontend and backend API.
Hi @giri-zano !!!
The member stuff stays the same. It didn’t really “move” anywhere.
Just swap out the old code with the new.
Some of it is a little funky. Like it used to be so straight forward to check if a user was logged in or not ——- now it’s longer.
Hey! like @codequeen said it’s not all that different, the isLoggedIn updating to currentMember → getMember is the most different I can think of as well.
As far as v2, this is a universal module - meaning anything in v2 will run on FE/BE unless specified at the level of the individual API. It’s in developer preview right now so unless there is something you need there I would stick with the other members apis
For your question about the data - migrating the API’s has no effect on the data, just how you interact with members.
As you look into it, there’s tons of folks here like codequeen that have been using these apis for awhile now and are happy to help. If you have any other questions definitely bring them up and any feedback is always welcome.
Thanks for your answers. Hey @codequeen, long time no hear. To clarify, it’s not the difficulty level that I’m worried about, it’s the amount of work it will take, for this was a huge project, some 15000 lines of codes, endless forms, reports, interaction with outside API’s (thru endpoints) and this code is in production, it is used 24 hours a day by us and website visitors. So I will have to shut down the reservation system, make the changes , push it and pray, something I am not looking forward to. If I could only make a full working test environment with a copy of the db, then I would have more time to test and when all well, push the new code (not the db). If anyone has a suggestion, I’d be happy to listen. (I know there is a TEST option now with the Publish option, bbut I understand that is NOT fully, 100% functional AND, horror, horror, connects to the live db, not a copy).
I totally understand.
Well supposedly the old code should continue to work as-is. You should only need to implement the new syntax if you are creating new code.
All of my original tutorial and test sites still use the original code. I was not about to go and update hundreds of sites!
If it were my site—— I would update only the page that I was needing updated. If any page was working fine as-is I wouldn’t go around to update it unless I was coding new things to that specific page.
Is something specifically broken or were you just trying to figure out what was possible in general?
Thanks. I’m just worried that the “deprecated” status one day will move to “dead”. So I’m looking into updating. Goes for this wix-member thing, but also support for .jsw’s. Are you saying that one page could use the new wix-members and another the old wix-users without any problems?
Yup.
I understand, but don’t worry. I had a meeting with Wix a week ago and I asked them what was up with all the deprecated stuff and they said it was just to encourage “a new way” from here forward. Wix Devs still use the deprecated APIs in their own projects. (Which is why i asked them that.)
Cannot thank you enough for this wonderful news: now I don’t have to touch it. Have a great weekend.
BTW if you ever speak to them again, could you make a push for dev’s being able to duplicate an entire site + db? We both know Wix has this tool for internal use and, to update and test larger, critical projects, it is indispensable.