Restrict EDD Downloads to Customers with at Least 5 Orders

Welcome to this tutorial. Here we show you how to restrict EDD downloads for customers with at least five orders in your Easy Digital Editions store. That is, we’ll restrict EDD downloads by orders total.

This can be very useful when, for example, you have products with somewhat high prices and you want only loyal customers to be able to buy them because, with five orders, you will be sure that they are customers with secure payment methods. This will help you avoid credit card fraud or any other payment method you use in your store.

Normally, it would take you several hours, but here we will use the WordPress Conditional Post Restrictions plugin. It allows you to apply conditional restrictions to your posts, pages, and any custom post types like courses, products, downloads, etc.

Regarding Easy Digital Downloads, you can apply these conditions:

In a previous tutorial, we showed you how to restrict EDD downloads by total sales. Here, we show you how to allow access to specific EDD downloads for loyal customers.

Just follow these simple steps:

1- Install the ‘WordPress Conditional Post Restrictions’ plugin

You can download the plugin here:

Download WordPress Conditional Post Restrictions Plugin - or - Read more

Once you install and activate the plugin, you can proceed to allow access to products for customers with 5 orders of more.

2- Restrict individual EDD downloads to customers with at least five orders

To restrict individual EDD downloads to customers with at least five orders, you need to follow some simple steps.

  1. Go to Downloads > All Downloads.
  2. Open the download you want to edit.
  3. Go to the Restriction Rules section in the edit download form.

Once you’re in the Restriction Rules meta box, you need to select the following values to enable a new restriction rule:

  • Enable content restrictions: Yes
  • What happens when the conditions are met: Allow access

After that, you need to move to the Restrictions meta box and add the following condition to restrict this EDD download by orders total:

  • Condition 1:  Total orders from the customer | >= | 5

restrict edd downloads by total orders

With this simple condition, you’ll have restricted access to this EDD download, and only the users who have made 5 purchases will be able to access it.

Now you just need to repeat this change for all the other EDD downloads you want to edit.

3- Restrict an entire EDD category by orders total

WordPress Conditional Post Restrictions allows you to easily restrict an entire EDD category by orders total. You can restrict hundreds of products within a specific category to users with at least 5 purchases or any other number.

Just follow these simple steps:

  1. Go to Downloads > Categories.
  2. Open the category you’ll edit.

Now you need to select these values to restrict this category by orders total:

  • Enable the conditional restrictions: Yes
  • Apply restrictions to: Category and posts
  • What happens when the conditions are met: Allow access
  • Conditions 1: Total orders from the customer >= 5
  • Update the category.

restrict edd downloads by total orders

Once you apply these values, the products within the selected category will be purchased by users whose orders total is five orders or more.

4- Optional. Restrict all your EDD downloads  by orders total

If for any reason you want to restrict all your EDD downloads so only customers with at least 5 orders can access them, you need to edit the plugin’s global restrictions.

In the global settings of the plugin, click the Add conditions button.

restrict edd downloads by total orders

Now you need to create a new condition using the following values:

  • Add new restrictions: Enter the restriction title
  • Select post types: Downloads
  • What happens when the conditions are met? Allow access
  • Condition 1: Total orders from the customer | >= | 5
  • Publish the restriction

restrict edd downloads by total orders

5- What happens when the EDD download is restricted?

You have several options to decide what happens when users who don’t meet the conditions try to access the restricted EDD downloads.

Go to Settings > Post Restrictions to open the global settings of the plugin. There, you’ll find the  following settings and fields:

restrict edd downloads by total orders

  • Enable restrictions: Tick/untick this checkbox to enable/disable the global conditions.
  • Don’t apply restrictions for these user roles: You’ll see a list of user roles for which the conditions won’t be applied. By default, we will not apply restrictions for administrators, editors, and any user with the capability edit_others_posts.
  • What happens when the post is restricted? You have several options to select what happens when the post is restricted; this applies to EDD downloads:
    • Redirect to URL
    • Remove the content and show a message
    • Show fragment of the content and show message after fragment
  • What happens when a category is restricted? You have several options to select what happens when the post is restricted; this applies to EDD categories:
    • Show error 404
    • Show the normal page without posts
    • Show an error message
    • Redirect to another URL
    • Show the content of another page

That was really simple!

With this change, you can reduce the risk of unknown credit card fraud. This is very common today and costs hundreds of thousands of dollars to different industries each year.

Fortunately, with WordPress Conditional Post Restrictions you can restrict access to your products to only those users who you are sure will pay for future purchases without any problems because they have already proven to be loyal customers.

You can download the plugin here:

Download WordPress Conditional Post Restrictions Plugin - or - Read more