PPWP WooCommerce Integration extension gives you the ability to sell partial protected content via WooCommerce. After purchasing, your customers will receive a quick access link or password allowing them to access protected content directly. What’s more, you have full control over password usage, such as expiring them after a period of time or a number of usage automatically. This helps prevent your protected content from being shared without your permission.
In this guide, we’ll show you how to protect and sell a part of your content access via WooCommerce.
- Password protect a part of content
- Associate a password label with a WooCommerce product
- Restrict password usage
- Customize the order confirmation message
- Logic & Limitations
Requirements:
- Password Protect WordPress Lite version 1.4.4 or greater
- Password Protect WordPress Pro version 1.2.2 or greater
- PPWP WooCommerce Integration version 1.0.0 or greater
1. Password protect a part of content
First of all, you need to protect your content using our [ppwp] shortcode.
It’s important to use the label-based passwords that allow unlocking the content with multiple different passwords, without having to update the shortcode frequently.
[ppwp pwd_label="sample"] Your protected content [/ppwp]
2. Associate a password label with a WooCommerce product
Go to create or edit a WooCommerce product. Then tick the Virtual checkbox to enable the PPWP Protection option.
Select “Partial Content Protection” from the protection type dropdown list, then you will see an option to set the password label.
Simply use the label that you have set in our shortcode in step 1. For example, we will add “sample” from the shortcode above to be the password label here.
After users complete their purchase, our plugin will generate a global shortcode (PCP) password with your preset label. As a result, users can use this password to unlock your partial protected content.
3. Restrict password usage
In order to prevent the customers from sharing your content, you should restrict the password usage. You can leave these fields empty to create never-expiring passwords.
Set usage limit based on the product quantity
Tick this checkbox if you want to increase the usage limit based on the product quantity.
Let’s say you set the usage limit to 1. When the customer buys 2 items of this product, they can use the password twice.
Set expiration date based on product quantity
Tick this checkbox if you want to increase the expiration time based on the product quantity.
Let’s say you set the password to expire after 1440 minutes (1 day). When the customer buys 2 items of this product, they can use the password within 2 days.
Note: Usage limit and Expiration time help to restrict the password usage only, not the protected content. Let’s say you set a password to auto-expire after 1 time of use. Once a customer enters the password to unlock the protected content section, the others will see the 404 page when attempting to use that password.
Technically, when the customer unlocks the content successfully, our plugin will store the password as a cookie on his browser. As a result, the customer can keep access to the content without re-entering the password until the cookie expires.
4. Customize the order confirmation message
You can customize the message to be embedded into the order page and email template. It should not contain [, ], “, ‘ characters.
Here is a sample message: Enter {password} to unlock our protected content section. The password will auto-expire after {usage_limit} times of usage or at {expiration_time}.
You can also use our custom tags to display other dynamic values.
{password}
refers to the password used to unlock the partial protected content{access_token}
refers to the access token used to create a quick access link (QAL). Using QALs allows users to access content directly without entering the passwords.{usage_limit}
will be replaced with the maximum number of times the password is inputted{expiration_time}
will be replaced with the time when the password expires
The screenshot below demonstrates how this message is shown to customers.
Grant access via QALs
You might want to create quick access links (QALs) to allow the customers to access content directly without entering passwords. To do so, simply insert the page URL followed by the access token.
Let’s say our page URL is https://passwordprotectwp.com/demo/sell-woocommerce-partial-content/.
Then the quick access link will be https://passwordprotectwp.com/demo/sell-woocommerce-partial-content/?{access_token}
.
Logic & Limitations
- You can generate only one PCP password per order. In other words, the number of passwords doesn’t depend on the number of associated products.
- If admin users delete a password generated by this extension (WooCommerce type), a new password will be generated automatically once the customer accesses the order page.
- Our plugin still generates a password without a label after the customer’s purchase if the label field is left empty. However, customers can’t use the generated password to unlock the protected content.
- Changing the protection type leads to generating new passwords and updating the confirmation message in all order pages including existing and upcoming ones.