WP Manifestindependent plugin directory
manifest / ecommerce / edd-cart-restrictions

Easy Digital Downloads Cart restrictions

Wordpress plugin to define excluding tags and categories for downloads in the Easy Digital Downloads plugin

★ 1stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/nwoetzel/edd-cart-restrictions/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

This pluging adds tha ability to definine excluding download_tags and download_categories for downloads, so that they cannot be added to the cart simulaneously.

Description

This plugin requires that you have installed:

Additional attributes (through meta data) are added to download_category and download_tag taxonomies. For each term (tag or category) tags and categories can be selected to be excluded in the cart. The scenario that this covers could be, that you have downloads that are free for academic or private users, but you want to charge commercial users. When the customer has a commercial product in the cart (with the tag 'commercial') you do not want the customer to be able to add an academically licensed product (with the tag 'academic'). You can now add 'commercial' as an excluded tag to the tag 'academic' or/and vice versa. When a conflicting download is displayed, the purchase link (add to cart button) will be hidden. Additionally, using edd_filters that product cannot be added to the cart.

Installation

Download the latest release from github as zip and install it through wordpress. Or use wp-cli with the latest release:

wp-cli.phar plugin install https://github.com/nwoetzel/edd-cart-restrictions/archive/1.1.0.zip --activate

Frequently Asked Questions

Is it guaranteed that the cart has no conflicting products?

The plugin is not tested thoroughly. Please check the source and open an issue, if you think there is a problem in the logic. In a future version, the cart before the checkout will be checked (which does not happen currently) and the checkout will be disabled. This could be an option later. With that, it would be easier that a customer puts everything in the cart, and cleans it before checkout.

Screenshots

Changelog

1.2.0

1.1.0

  • added load_textdomain
  • added translation for de_DE

1.0.1

  • array_merge with null meta data fixed
  • disabled purchase button lists the conflicting downloads in the cart

1.0.0

  • Initial release