As soon as you have set up memberships, you can choose which user group you want a particular block to be visible to. This is configured through the "eye" icon next to the block name and has the following options:
All users (selected by default)
Logged in users
Non Logged in users
If you switch the block visibility to Logged in users or to Non Logged in users, a padlock icon will start appearing on the block, as shown below, indicating that it's gated content with limited visibility.
For example, the block visibility feature can be used to show a header with log in/sign up buttons to non logged in users and a different header without buttons to logged in users (discussed here). But that's just one case, and there can be many other cases when you need to display/hide a certain block from different user groups, thus having a different content for logged in and non logged in users.
Apart from making the block accessible to a specific groups of users, you can also define other conditions including payment (e.g. users can access the block only after making a payment). Please, note that you can start configuring payment conditions only after connecting your Stripe account.
First of all, from the dropdown at the top you should choose whether the user needs to meet any or all of the conditions defined below to be able to view the block.
You can add as many conditions as required, and they'll be joined with OR (match any is selected) or AND (match all is selected).
Now, let's add a condition using the Add condition button to see how it's configured. There are three fields in Condition Settings, so let's see how each of those works.
First, you need to select the attribute for which you want to set a condition. There are the following options:
Logged in User's Email
Logged in User's Email-domain
The first two options are payment-related and are for selecting One-time products or Subscriptions created in your Stripe account. For instance, you can use this to provide access to a given block only to the users who have purchased a specific subscription.
The last two options are for defining a condition based on user's email address (e.g. firstname.lastname@example.org) or user's email address domain (e.g. softr.io). This way, you can restrict the block visibility to a specific group of email addresses or email address domains.
Here, the list of options differs based on the Attribute you've selected. For the payment-related attributes (One-time product and Subscription) the conditions are as follows:
is one of (the user has purchased at least one of the subscriptions/products selected in the Value field below);
is none of (the user hasn't purchased any of the selected values);
has all of (the user's purchases contain but are not limited to the selected values).
For the email attributes (Logged in User's Email, Logged in User's Email-domain), you have these conditions:
is one of (corresponds to one of the added values);
is none of (doesn't correspond to any of the values added below).
Finally, you need to add the values for which the defined condition should work. For One-time Product and Subscription attributes you should see a list of values based on what you have created on Stripe. You can select as many values as needed.
For email-related attributes, you can type in the values and have as many values as needed (type the email address or domain and hit Enter to add the value). In the below example, if the user's email matches any of the two emails added in the Value field, he/she will have access to the block.
That's it. You can add more conditions the same way to customize the visibility of your block according to your needs.