Show pricing for authenticated users only
Only show pricing information for users that are logged in, by executing these steps:
-
In your frontend, add the classname
tw__is-authenticated
to your html or body element when the current user is logged in. -
In Studio - Tile Editor, add the classname
tw_pricing
to the pricing element: -
In Studio stylesheet, hide the pricing element by default, show pricing element when logged in:
/* Default state: do not display price */
.twn-product-tile-dynamic .tw__price {
display: none;
}
/* Authenticated: display price */
.tw__is-authenticated .twn-product-tile-dynamic .tw__price {
display: block;
}