WordPress Invitation Code - How To - Sell the Access Codes Directly From the WooCommerce Shop

Back to User Guide


Introduction

It's possible to sell invitation codes directly from your WooCommerce shop, and you can use the same product for generating different codes for different buyers. 

This feature was introduced in version 1.3.10 of WordPress Invitation Code plugin.

Note: The following instructions work the same for restricting URL, Posts/Pages, Content inside Page/Post, File Upload and File Link. In our example we will follow the steps to restrict posts.


Step by Step

Navigate to Admin Dashboard â†’ Invitation Code Content Access â†’ Setting.

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

In the General tab, under the Payment section, find and enable these three options:

  • Enable Payment
  • Auto create/update WooCommerce products for invitation codes with price
  • Allow to sell invitation codes via products ordered directly from the shop catalog
Payment settings - Restrict Content Plugin
Payment settings

Then click the button Save Changes at the bottom of the page.

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

Now you can start creating the invitation code.

While creating code you need to configure the following:

  1. Add the code name (for internal usage only).
  2. Define what content is restricted
  3. Define the expiration time - how long the content will be unlocked after the code activation.
Form for creating invitation code - Private Content WordPress Plugin
Form for creating invitation code

The section Notify User should be empty, as when the user purchases the code, the Notification email will be filled automatically for the generated code.

Notify user settings - Members Plugin Restrict Content
Notify user settings

After filling all information while creating the code, don't forget to set the price:

Setting the price for an invitation code - Portal WordPress Plugin Private Content Per User
Setting the price for an invitation code

Important! The field WooCommerce product ID must be empty - the product will be created automatically and you don't need to create it manually and enter it's ID here.

Keeping WooCommerce product ID field empty - Members Plugin Restrict Content
Keeping WooCommerce product ID field empty

And the second crucial thing - enable the option Use code as template:

Using the invitation code as a template - Invitation Code Registration for WordPress
Using the invitation code as a template

Now you can Publish the code.

Publishing the template code - WordPress Content Restriction
Publishing the template code

The created code is in a list of invitation codes:

Generated template code - Private Content WordPress Plugin
Generated template code

The relevant WooCommerce product was created automatically:

Automatically generated WooCommerce product - Restrict Content Plugin
Automatically generated WooCommerce product

Now you can sell the code directly from your WooCommerce shop:

Selling the code in WooCommerce shop - WordPress Register with Invitation Code
Selling the code in WooCommerce shop

Now every time someone buys the code a new unique code is generated, and you can see it in the list of the invitation codes.

Generating code for each new purchase - Portal WordPress Plugin Private Content Per User
Generating code for each new purchase

Using this simple instruction you can sell different invitation codes using the same product directly from your WooCommerce shop. 

But remember: you need to create a separate template code for each item (page, post, url etc.) you want to restrict.

How Are Purchased Codes Delivered To Customers?

Email Notifications

When the user makes a purchase, he recieves an email notification with the code and the links that the code gives access to.

Email notification with purchased invitation code - Members Plugin Restrict Content
Email notification with purchased invitation code

You can edit the email template. To do this, navigate to Admin Dashboard â†’ Invitation Code Content Access â†’ Setting → Notifications tab.

Notifications settings - Invitation Code Registration for WordPress
Notifications settings

Scroll down and find the section Payment Confirmation Notifications. Here you can edit E-mail Subject and E-mail Content:

Payment Confirmation Notifications email notification template - WordPress Content Restriction
Payment Confirmation Notifications email notification template

The area E-mail Content accepts the following shortcodes for adding dynamic content:

  • [FNAME] - First name.
  • [LNAME] - Last name
  • [EMAIL] - Email address.
  • [ICODE] - The code itself.
  • [URL] - One or multiple URLs that the code is associated with.

Order Details Page

Since the plugin version 1.6.6, the purchased codes are also displayed on the Order details page:

Displaying purchased code on the order details page - Private Content WordPress Plugin
Displaying purchased code on the order details page

The Access Code label can be changed. To do this, navigate to Admin Dashboard → Invitation Code Content Access → Settings → Labels tab. Needed label Text in Order Note can be found under the Other section.

Editing the label - Restrict Content Plugin
Editing the label

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.