WordPress Invitation Code - Use Case - How to Create Invitation Codes In Bulk


Use Case – How to create invitation codes in bulk

Back to User Guides

Note: This guide requires:


Introduction

This WordPress Invitation Code plugin allows you to create and sell a series of personalized temporary access codes. Each code grants limited access to a selected page only.  When creating codes, you assign them to a post, a page, a URL or a file. It will automatically be locked and, when accessing it, visitors will be prompted to input the code.

Use Case Front-End

Generating a sequence of codes:

Generating invitation codes in bulk - Members Plugin Restrict Content
Generating invitation codes in bulk

Accessing the post using a code on the front-end:

Access Content in WP with invitation code - Invitation Code Registration for WordPress
Access Content in WP with invitation code

Use Case Assumptions

In this example use case guide we will consider how to create invitation codes in bulk. In can be done in a few ways: 

  • Generate a sequence of codes
  • Import codes from a CSV-file

Important

Currently, the plugin does not support assigning prices while creating invitation codes in bulk. You can either edit each code manually to make it paid or you can create a template code that will generate a new code for each new customer. Learn more about this method in this guide: WordPress Invitation Code - How To - Sell the Access Codes Directly From the WooCommerce Shop

We consider that you have already bought the WordPress Invitation Code plugin, but not installed it yet. 

Note: the following instruction works the same for restricting URLs/Pages, Posts, Content inside Page/Post, File Upload and File Link. In our example we will consider restricting a post.

It follows:

Installing the Plugin

The process is the same for all CM plugins and add-ons.

CreativeMinds Customer Account Dashboard - Downloads tab
CreativeMinds Customer Account Dashboard
  • Download the plugin from your customer dashboard.
  • Log in to WordPress and navigate to the WordPress Admin  → Plugins settings.
  • Click on Add New.
  • Activate it and add the license.

Learn more: Getting Started - Plugin Overview


Initial Setup

Before starting, WordPress Invitation Code plugin has to be properly set up.

If you still haven't configured:

  • General settings for codes.
  • Notifications - email notifications for admins and users.
  • Labels - configure/translate messages that the user will see in front-end.

Also, we consider that you've already have existing posts that you need to restrict with the codes.


Generate a Sequence of Codes

Let's start with the first method of creating codes in bulk - generating a sequence of codes.

To do this, navigate to Admin Dashboard → Invitation Code Content Access → Generate Sequence codes.

Plugin navigation - WordPress Content Restriction
Plugin navigation

There you will see a form that consists of a few sections.

Sequence Parameters

First section contains the general settings for generating a sequence of codes.

Settings for generating sequence of invitation codes - Private Content WordPress Plugin
Settings for generating sequence of invitation codes
  • Sequence name (internal use only) - Write down the name of the sequence (for internal use only).
    • Randomized codes? - If enabled, codes will be randomized. If disabled, they will be sequential.

      Example

      • Sequential Codes - code_001, code_002, code_003...
      • Randomized Codes - FJTA, AKWW, SU8R...
  • Number of invitation codes to create - Define how many codes will be created.
  • Add prefix to codes? - Enable to append a prefix to all codes. Some examples: "code_", "2019sale_". If the option is enabled, one more options appears:
    • Prefix - Write down a prefix.

      Code prefix settings - Restrict Content Plugin
      Code prefix settings
  • Note - Add a note (can only be seen by the admin).

Important: Prefix Settings

It's possible to change the format of the invitation code to a four-symbol format. It can be done in plugin settings under the General tab by turning on the option Enable four digits invitation code. If you did it and want to generate a sequence of four-symbol codes in bulk with a prefix, then make sure to enable the option Show prefix before four-digits codes.

Invitation codes specifications - WordPress Register with Invitation Code
Invitation codes specifications

Learn more about these options in this guide: WordPress Invitation Code - How To - Limit Codes to Four Digits

What is restricted

In the next section you define the type of restricted content.

Specifying the restricted content - Portal WordPress Plugin Private Content Per User
Specifying the restricted content

You can choose between:

How and When Code Expires

Next section defines the behavior of the invitation code.

Setting up the expiration restrictions for invitation codes - Members Plugin Restrict Content
Setting up the expiration restrictions for invitation codes
  • Number of uses - Set how many times each code can be used (Set it to "0" to make it unlimited).
  • Valid from - Define the activation date and time for codes. Leave empty to activate the code right away (respects the website time zone).
  • Expires on - Define the expiration date and time for codes. Leave empty to never expire (respects the website time zone).
  • IP limit - Set the number of unique IP-addresses that can use the same invitation code. Everyone who used the code - their IP's will be saved for this code, and they can continue use it until it expired. But all other people will not be able to use the same code. Leave empty to keep it unlimited.

In the following options you need to choose one of the expiration types for codes and define an expiration time for it.

  • Once activated, expires after some time - The code expires a certain amount of time after the user used it for the first time. Time passes even if the user is not watching the content.
    • How much time the code can be used for - Enter the amount of hours or days. 1 is one hour, 0.5 is half an hour (30 minutes) etc. The value for days can be only integer. The default value is 1.
  • User can only access blocked content for some time - The code expires after the user spent a certain amount of time on your site. Time passes only if the user is accessing the content. 
    • Blocked content access time limit - Enter the amount of hours. 1 is one hour, 0.5 is half an hour (30 minutes) etc. The default value is 1.

Categories

Next section contains only one option for assigning codes that will be generated to a certain category. 

Selecting a category for generated sequence of codes - WordPress Invitation Code
Selecting a category for generated sequence of codes

Classifying the codes can make your work with them simpler. Learn more about creating categories: WordPress Invitation Code - Code Categories

Security and Privacy

Last section allows you to show a disclaimer to your site visitors that use access codes. 

Setting up disclaimer text for invitation codes - Invitation Code Registration for WordPress
Setting up disclaimer text for invitation codes

This field overrides the default disclaimer text that is defined in plugin settings. Learn more about configuring the default disclaimer: WordPress Invitation Code - Settings - General (Configuring Access, Privacy)

When everything is configured, click the button Generate. You will see the list of generated codes. You can either download a CSV file with these codes by clicking on the relevant link or click Show codes to the list in the admin dashboard.

Generating a sequence of invitation codes - WordPress Content Restriction
Generating a sequence of invitation codes

In the admin dashboard you can:

  • See all base information about each code in the table: category, ID, title, note, the code itself, the expiration date and time, number of usages, restriction type, list of restricted content and if there was send an email notification.
  • Apply bulk action to codes: edit, delete or make them all unlimited.
  • Filter codes by dates, categories and sequences.
  • Search for certain codes.
  • Export to a CSV file all codes and access log.
Managing the invitation codes - Private Content WordPress Plugin
Managing the invitation codes

Result On the Front-end

Now let's see the result on the front-end.

Accessing the content with invitation code - Restrict Content Plugin
Accessing the content with invitation code

Import Codes From a CSV-File

Another way of creating invitation codes in bulk is to import them from a CSV-file. You can either prepare a list of your own codes in advance or use the list of email addresses. Codes can be generated automatically for each email address or email addresses can be used as invitation codes. To do this, navigate to Admin Dashboard → Invitation Code Content Access → Import codes from CSV

Importing invitation codes from CSV - WordPress Register with Invitation Code
Importing invitation codes from CSV

There you will see a form that is almost the same as in the previous method for generating a sequence of codes. The difference is only in the first section. The options are:

Settings for importing invitation codes from CSV - Portal WordPress Plugin Private Content Per User
Settings for importing invitation codes from CSV
  • Sequence name - Write down the name of the sequence of codes that will be created (for internal use only and will not affect the codes).
  • Upload CSV file with invitation codes - Choose here a CSV file that you want to import data from.

    Example of a CSV file with emails

    Example of a CSV file with emails list - Members Plugin Restrict Content
    Example of a CSV file with emails list
  • Use CSV as list of emails - Enable it if you want to send generated codes to email addresses from a CSV-file. Let's turn it on for our use case. A few more options will appear below.
    • Use emails as codes - If enabled, email addresses will be used as invitation codes. We will not enable this option for our use case.
    • Randomize codes - Enable this option to randomize codes, otherwise they will be sequential. Let's turn it on, to create randomly generated code for each email.
    • Add Prefix to code - Enable this option if you want to add prefix to the generated codes. Let's enable it. One more option will appear below for entering a prefix.
      • Prefix - Write here a prefix that will be used for the generated codes.
  • Note - Add a note (can only be seen by the admin).

The options in other section can be fill the same as the previous method. After everything is filled, click the button Import below the form.

'Import' button - WordPress Invitation Code
'Import' button

You will see the report about generated codes and that they were sent to email addresses. The same as in the previous method, you can download a CSV with generated codes or see the list in the table where you can manage them.

The generated codes based on the email list from CSV - Invitation Code Registration for WordPress
The generated codes based on the email list from CSV

This time you will see a status "Sent" in the column Notification E-mail for relevant codes, as the codes were sent to corresponding email addresses.

Managing invitation codes - WordPress Content Restriction
Managing invitation codes

Email Template

You can customize the template of email with codes that will be sent to users. To do this, navigate to  Admin Dashboard → Invitation Code Content Access → Settings → Notifications tab. 

Navigation to notifications settings - Private Content WordPress Plugin
Navigation to notifications settings

Find there the section Template for "Use CSV as list of email" option.

Email template for sending invitation codes to users - Restrict Content Plugin
Email template for sending invitation codes to users

You can customize E-mail Subject and E-mail Content. For customizing the content of the notification email you can use the following shortcodes:

  • [ICODE]  - The code itself. This shortcode must be in the email template.
  • [URL]  - Link to the restricted page.
  • [EDATE]  - Expiration date of the invitation code.
  • [EMAIL]  - User's email.
  • [NOTE]  - Note (internal note).

After changing the email template, click the button Save Changes at the bottom of the page.

'Save Changes' button - WordPress Register with Invitation Code
'Save Changes' button

Example of the email notification: 

Example of the email notification with the invitation code - Portal WordPress Plugin Private Content Per User
Example of the email notification with the invitation code

End Result

Following instructions found in the plugin and guides, you should be able to create invitation codes in bulk.

Use Case Front-End

Generating a sequence of codes:

Generating invitation codes in bulk - Members Plugin Restrict Content
Generating invitation codes in bulk

Accessing the post using a code on the front-end:

Access Content in WP with invitation code - WordPress Invitation Code
Access Content in WP with invitation code

More information about the WordPress Invitation Code Plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.