In this post, we show you how to restrict downloads based on GiveWP donations.
For example, you may need to give annual reports to your users who have donated at least $1000. Also, you may want to give access to annual reports to donors who have completed 10 donations at least.
All other donors won’t have access to these downloads because the condition will be a certain donation amount or a certain number of donations completed.
What do you need to restrict downloads based on donations?
Normally, you’d have to program that conditional restriction from scratch or hire a professional programmer who would certainly take some time and a considerable amount of money.
Fortunately, you can easily restrict files based on GiveWP donations using the WordPress Conditional Post Restrictions plugin. You can apply any conditional restriction to your WordPress posts, pages, and any other custom post types generated by other plugins such as courses, donations, events, products, downloads, etc.
You can download the plugin here:
Download WordPress Conditional Post Restrictions Plugin - or - Read more
Important
- Besides the WordPress Conditional Post Restrictions plugin, you will need to use any WordPress downloads manager. In this post, we’ll use the WordPress Download Manager plugin. This is important because the download managers create the “Download” post type, and WordPress Conditional Post Restrictions works with post types.
- This tutorial assumes you already have created the downloads you’ll restrict based on GiveWP donations.
Once you create the downloads you’ll restrict based on donations and installed the WordPress Conditional Post Restrictions plugin, you can proceed to restrict files based on GiveWP donations.
Just follow these simple steps:
1- Open the file you’ll edit
Depending on the downloads manager you’re using, you’ll follow a path to your downloads list.
We’re using the WordPress Download Manager plugin, so we need to go to Downloads > All Files.
We’ll open the 2020 Report file.
2- Restrict downloads based on user donations amount
In this example, we’ll restrict downloads based on user donations amount. That means we’ll select a minimum donation amount that will be the condition to access the file we’re editing.
Once we open the file we’ll restrict based on user donations, you need to scroll down to the Restriction Rules section and select the following values:
- Enable content restrictions: Yes
- What happens when the conditions are met: Restrict access
- Condition 1: User donation amount | >= | 1000
- Update the file to save the changes.
3- Restrict downloads based on user donations count
Instead of restricting files based on user donations amount, you can restrict them based on donations count.
For example, you can give access to your files to all the users who have made at least 10 donations.
Just select the following values in the Restriction Rules sections.
- Enable content restrictions: Yes
- What happens when the conditions are met: Restrict access
- Condition 1: User donation count | >= | 10
- Update the file to save the changes.
4- Restrict downloads category based on donations amount or donations count
If instead of restricting files individually you want to restrict an entire files category, you can do it quickly with WordPress Conditional Post Restrictions. You just need to open the categories list.
In this case, we’ll go to Downloads > Categories.
We’ll open the Donation Reports category.
Once you open the category you’ll edit, you need to select the following values to restrict this category based on donations amount or donations count:
- Enable the conditional restrictions: Yes
- Apply restrictions to: Category and posts
- What happens when the conditions are met: Allow access
- Condition 1: You can select any of these conditions:
- User donation amount | >= | 1000
- User donation count | >= | 10
- Update the category.
5- What happens when users try to access restricted downloads?
To select what happens when users try to access restricted files, you need to edit the global settings of the plugin.
Go to Settings > Post restrictions and you’ll be able to decide if you want to redirect users to a different URL or if you want show an error message.
Restricting downloads based on donations is really simple!
As you see, it’s really simple to restrict downloads based on GiveWP donations with the WordPress Conditional Post Restrictions plugin. You don’t need to program anything nor hire a professional programmer.
You can easily apply endless conditional restrictions to your posts, pages, products, donations, events, downloads, files, etc.
You can download the plugin here:
Download WordPress Conditional Post Restrictions Plugin - or - Read more