Two shortcodes display information about memberships in your pages: one lists the memberships of the logged-in user, the other shows how much money the current cart saves.
List the user’s memberships
The first shortcode displays the name of each membership the current user belongs to, separated by commas.
[[wv_member_memberships lounge="lounge_name1, lounge_name2"]]
It has one option:
- lounge : (Optional). If not set, the shortcode lists all the memberships of the user. If set, it only lists the memberships of this list that the user belongs to. Separate several memberships with commas. You can find this value in WooVIP → Memberships, in the Shortcode Attribute column.
A membership the user does not belong to is never listed. If the user has none of them, the shortcode displays nothing.
You can see it, with the other shortcodes, in
It is called User’s membership name(s) there.
Show the savings anywhere
The savings widget shows how much the current cart saves thanks to a membership. You can display it in the cart and checkout pages with the options of the WooCommerce tab, or anywhere you want with this shortcode:
[[wv_show_savings]]
This shortcode has no option. The memberships and the texts come from the settings, in
The settings are in the group Membership Savings. The shortcode ignores Cart Display and Checkout Display: they only control the automatic display in those pages.
What the widget displays
- Nothing, if no membership is selected in Select the desired memberships.
- Nothing, if the cart is empty.
- For each selected membership, one text. A member of this membership sees the Members text, if Show savings for members is checked. A customer who is not a member sees the Teaser text, if Tease savings for non members is checked.
- The Header above these texts, if you set one and at least one text is displayed.
If several memberships are selected, the text is repeated for each of them.
Savings placeholders
In the Teaser text and the Members text, use these placeholders. The plugin replaces them with the real values for the current cart:
- [membership_name] : the name of the membership
- [saved_percentage] : the percentage (potentially) saved on the current cart, with one decimal at most, followed by %
- [saved_amount] : the amount (potentially) saved on the current cart, formatted as a WooCommerce price
The texts are written with an editor, so you can add your own HTML and CSS. The placeholders do not work in the Header.
Default Teaser text :
If you were a member of the [membership_name] membership, you would've saved [saved_percentage] on the cart, for a total amount of [saved_amount]
Default Members text :
Thanks to your [membership_name] membership, you saved [saved_percentage] on the cart, for a total amount of [saved_amount]