Easy Digital Downloads Integration: Restrict Content to Customers

Restrict for WordPress integrates nicely with Easy Digital Downloads, giving you Easy Digital Downloads content restriction across your whole website. You can make pages, posts, parts of content, categories, widgets and menu items visible only to customers who purchased any EDD product or one specific product – optionally for a limited time after purchase. This guide covers the required store setting and every restriction option the integration adds.

Before you start: require login at checkout

For purchase-based restriction to work, a customer must be registered and logged in before they buy anything through Easy Digital Downloads. Otherwise there is no way for Restrict to later connect a purchase to the visitor viewing your content.

  1. Go to the Settings page of Easy Digital Downloads.
  2. Click the Misc tab, then Checkout.
  3. Check the option labeled Require Login. This forces customers to be registered and logged in to complete a purchase.

Easy Digital Downloads checkout settings with the Require Login option checked

This is a crucial step: it is the only way for Restrict to know whether the customer trying to view restricted content has actually purchased the required product.

With that out of the way, here is what the integration brings to the table.

Custom messages for Easy Digital Downloads content restriction

With Easy Digital Downloads installed on the same website as Restrict, you will notice another tab within the Restrict settings, labeled Easy Digital Downloads.

Easy Digital Downloads tab in Restrict settings with custom message fields for restricted content

In this area you can define the custom messages shown to users who do not meet the required EDD criteria for viewing specific content. There are three messages you can set:

  • Any product – shown to users who have not purchased any Easy Digital Downloads product but are trying to access content that requires at least one purchase.
  • Specific product – shown to a user who has not purchased the specific EDD product required to view the restricted content.
  • Specific product (limited time) – shown to a customer who did purchase the required product, but whose access time has expired so they can no longer view the content.

Use these messages to tell visitors exactly what to buy to unlock the content – a clear call to action here directly drives sales.

Restrict a whole page or post

You can restrict the content of an entire page or post with EDD criteria by selecting Easy Digital Downloads Users from the Content Available To dropdown menu. Two options then appear:

  • Any product – the user must have purchased any Easy Digital Downloads product to access the content.
  • Specific product – the user must have purchased a specific EDD product, which you select in the field below this option. With this option you can also limit how long access lasts. If Indefinitely is set, there is no time limit; if you select Limited time after purchase, you can set the number of days, hours and minutes during which the user can access the content.

Post editing screen with Easy Digital Downloads Users selected in the Content Available To dropdown and the specific product options visible

The time-limited option works the same way as in our WooCommerce integration – you can see a practical walkthrough in the time-based content restriction guide.

Restrict part of the content with shortcodes

You can also restrict just part of the content of any page or post using EDD criteria in the Shortcodes area of Restrict. This lets you keep a public teaser visible while the premium portion – a download link, tutorial, or bonus material – stays locked.

Shortcodes tab in Restrict showing the Easy Digital Downloads Users section for generating purchase-based shortcodes

Select the Easy Digital Downloads criteria and Restrict generates the shortcode for you, ready to wrap around any part of your content as explained in the shortcodes documentation.

You can add a custom message as well by using the protected_message argument as part of the shortcode. For example:

[rsc_restrict_content allowed_to=”edd” edd_options=”anything” protected_message=”YOUR MESSAGE HERE”]Your content here[/rsc_restrict_content]

Restrict post categories

Restricting whole categories with EDD criteria is also possible. Simply select Easy Digital Downloads Users from the Posts from category visible to: dropdown menu when creating a new post category or editing an existing one.

Category editing screen with Easy Digital Downloads Users selected in the Posts from category visible to dropdown

Every post in the category then follows the same rule, which saves a lot of clicking when you publish customer-only content regularly. More details are in the category restriction guide.

Restrict widgets

Similarly to page and post restriction, you can control the visibility of widgets on your website using Easy Digital Downloads criteria.

Widget settings with the Widget visible to dropdown set to Easy Digital Downloads Users

When adding a new widget or editing an existing one, simply select Easy Digital Downloads Users from the Widget visible to: dropdown menu.

Restrict menu items

Last but not least, you can restrict the visibility of menu items based on EDD criteria. Each menu item contains a Menu item visible to: dropdown menu from which you can select Easy Digital Downloads Users.

Menu item settings showing the Menu item visible to dropdown with Easy Digital Downloads Users selected

This way, links to customer-only pages appear in your navigation only for users who actually have access.

Good to know

Restrict offers the same style of integration for WooCommerce and Tickera, so you can pick whichever e-commerce plugin fits your store. The Easy Digital Downloads integration is part of Restrict for WordPress – see plans and pricing for 1-site, 5-site and unlimited licenses, billed yearly or as a one-time lifetime payment.

Related documentation