Redirect if not a "paid plan" member?

Hi Aspect,

You can do this by getting the plans for the current user with wix-users in code. Then use wix-llocation to redirect them. Here is a code example

import wixUsers from 'wix-users';
import wixLocation from 'wix-location';
let user = wixUsers.currentUser
let categories = new Array()

$w.onReady(function () {

user.getPricingPlans()
.then((pricingPlans) => {
    pricingPlans.forEach(function(item){
    categories.push(item.name)
    })
    if (categories[0] === undefined){
        console.log("user is not a paying member")
        wixLocation.to("/site1");
        }
    else {
        console.log("user is a paying member")
        wixLocation.to("/site2");
        }
    return
    })
});