Shortcodes for Members’ Codes
Shortcodes for Members’ Codes

Knowledge Base

These two shortcodes are available when WooVIP is active. They let your members generate registration codes and follow them. First set the codes up on a membership: see Let Members Offer a Membership.

Go to

WordPress Admin
WooVIP
Appearance

You find them, with their options, in the shortcodes tab of this page, in the group Registration Codes.

Code generation

Displays to your members a tool to generate registration codes for their friends.

[[rc_vip_code_generation]]

The tool lists the memberships the member can offer, with the duration of each. The member selects one, then clicks the generation button. The new code appears with a button to copy it, and a sentence telling what it gives, for example This code gives access to the (membership) membership for (duration) upon registration. A membership disappears from the list when the member has no code left for it.

The tool is displayed to members who still can generate codes. Other visitors see nothing, or the content you put between the opening and closing tags of the shortcode.

Options:

  • label: the label displayed on top of the registration codes form. Default is Select a membership to offer.
  • button: the label displayed on the code generation button. Default is Generate a registration code.
  • id: (optional) for styling purpose, an id set on the DOM element.

Example: [[rc_vip_code_generation label="Offer a membership" button="Get a code"]]

Codes history

Displays the registration codes of the logged-in member, the ones they can share, and their status.

[[rc_vip_codes_history]]

The list updates by itself when the member generates a new code. If the member has no code yet, nothing is displayed, or the content you put between the opening and closing tags of the shortcode.

Options:

  • columns: the columns to display, separated by commas. By default, the shortcode displays the code, the creation date, the code status and the membership given.
  • column_headers: the headers that match the columns you set in the columns option, separated by commas. Ignored if the columns option is missing.

The available columns and their default headers:

  • code: the registration code. Header Code.
  • creation: the code creation date. Header Creation Date.
  • status: the code status, Used or Not used. Header Status.
  • user: name of the person who used the code. Header Used by.
  • email: email of the person who used the code. Header Used by email.
  • used: date at which the code was used. Header Used date.
  • membership: the membership given by the code. Header Membership given.
  • duration: the duration of the membership given by the code. Header Membership duration.

Example: [[rc_vip_codes_history columns="code, creation" column_headers="Registration Code, Creation Date"]]

Was this article helpful?
Dislike 0
Views: 0

Continue reading

Previous: Build a Registration Form