Restrict integrates nicely with Easy Digital Downloads. This allows you to use criteria specific to Easy Digital Downloads and restrict the content on your website. Of course, for this to work, a customer must be registered and logged in before they make any purchases through Easy Digital Downloads. To make sure that is the case, head to the Settings page of Easy Digital Downloads and then click Misc tab and then Checkout. Over there, you will find an option labeled Require Login which, if checked, will force customers to be registered and logged in to be able to make a purchase.
This is a crucial step since it is the only way later on for the Restrict to be able to “know” whether the customer that attempts to view certain restricted content have made a purchase for the required product.
With that out of the way, let’s see what options this integrations brings to the table.
With Easy Digital Downloads installed on the same website where you’re running Restrict, you will notice that there is another tab within Restrict settings, labeled Easy Digital Downloads.
If you navigate there, you will find that in this area you can define custom messages that will be used if users do not meet the required Easy Digital Downloads criteria for viewing specific content. There are three custom messages you can set:
You can use Easy Digital Downloads specific criteria to restrict the content of the whole page or post by selecting Easy Digital Downloads Users from the Content Available To dropdown menu. By selecting this criteria, two options will appear:
With Easy Digital Downloads plugin installed alongside Restrict, you can also restrict part of the content of any page or post using Easy Digital Downloads specific criteria in the Shortcodes area of Restrict.
This option allows you to easily create a shortcode with Easy Digital Downloads specific criteria that you can then use to restrict access to part of the content of your page or post as explained here.
You can also add a custom message if needed by using a protected_message argument as part of the shortcode. For example, your shortcode can look something like this:
[rsc_restrict_content allowed_to=”edd” edd_options=”anything” protected_message=”YOUR MESSAGE HERE”]Your content here[/rsc_restrict_content]
Restricting categories is also possible with Easy Digital Downloads specific criteria. Simply select Easy Digital Downloads Users from the dropdown menu Posts from category visible to: when creating new or editing existing post category.
Similarly to page/post content restriction, you can also restrict visibility of the widgets on your website using Easy Digital Downloads criteria.
When adding new or editing existing widget, simply select Easy Digital Downloads Users from the Widget visible to: dropdown menu.
Last but not least, you can also restrict the visibility of menu items based on Easy Digital Downloads criteria. You will notice that each menu item contains Menu item visible to: dropdown menu from which you can select Easy Digital Downloads Users