Hi,
Does anyone have experience with the Wix Pain Plan App and integration in Wix code?
Can code be used to check if the current logged in user has selected (and paid) for a specific membership? I can see it in Dashboard, but want to prevent users to choose a plan if they have already chosen it.
Can specific plan options be shown on the page using code?
Is there any result feedback that can be used in code when the user has selected and paid for a specific plan?
In Dashboard I also see a filter option "Refunded". How does that work with the pain plans app?
Kind regards.
Yes, you could use this snippet, its not full but you get the picture where you can check their roles.
let user = wixUsers.currentUser; let userId = user.id; // "r5cme-6fem-485j-djre-4844c49" let isLoggedIn = user.loggedIn; // true if (!isLoggedIn) { wixLocation.to("/login");} let userRole; let userEmail; user.getEmail() .then( (email) => { userEmail = email; user.getRoles() .then( (roles) => { userRole = roles[0].name; // After the roles have been defined check them! if (user.role === "Member" && (userRole === "Manager") || userRole === "Administrator") {
Hi, I like this. I am currently working on a site that offers a free 30 day trial as a plan. Can we use something similar to this to hide the 30 day trial plan from users who are already on that plan? More importantly I need to find a way to prevent the user from signing up for the free trial plan more than once... Any Ideas? Thanks