Show a linked list of downloads in your emails with Easy Digital Downloads

Add a {downloads} email tag to Easy Digital Downloads to show a linked list of downloads in your emails.

An Easy Digital Downloads customer needed a way to output a simple list of linked downloads in their emails.

One example of why this can be useful is if you are using the excellent reviews add-on. To encourage the customer to leave a review, you could kindly ask them in the purchase receipt to rate your downloads, followed by a list of the downloads they purchased. Each download links right back to the product’s page on your website.

This tiny plugin adds a {downloads} email tag which you can then use for either the purchase receipt email or the admin notification email. Once activated, add the {downloads} email tag to your email templates from Downloads → Settings → Emails.


Say “thanks!” to your customers with EDD Purchase Rewards

Reward customers that purchase from your online store with the free EDD Purchase Rewards plugin for Easy Digital Downloads

Have you ever wanted to reward customers that purchase from your online store? With the free EDD Purchase Rewards plugin for Easy Digital Downloads you can do just that. They simply make a purchase, and receive a discount which is shown on the confirmation page (it can also be sent to their email)!

Or, would you like your customers to share their latest purchase before they get a discount? Enable this setting, and ask the customer to share their purchase to their favorite social network before their discount is unlocked for future use. The site owner benefits from more exposure (hopefully more sales), and the customer receives a nice discount to use on their next purchase. It’s a win for everyone!

Providing your customers with a little something extra after they have placed their trust in your products or services is a great way to build loyalty. These customers are more likely to purchase from you again in the future, and more likely to tell others about their positive experience.

Download now for free

Ask customers to share for a specified percentage or flat rate
Optionally ask your customers to share before receiving the discount
As soon as the customers have shared, they are rewarded with a discount code. This can be a discount code you've already made, or choose to create one on the spot
As soon as the customer has shared, they are rewarded with a discount code. This can be a preselected discount code, or choose to create a unique one-time use discount code.
The one-time use, unqique discount code is created just for the customer
The unique, one-time use discount code is created for the customer. The customer’s email address is used for the name so it’s easily identifiable.
A payment note is recorded showing the discount code that was stored against the purchase
A payment note is recorded showing the discount code that was stored against the purchase.

Let’s look at what this plugin allows you to do:

  1. Reward the customer with a discount code for purchasing from you
  2. Pre-select a discount code, or generate a unique, one-time use discount for the customer. The generated discount can be a percentage, or flat amount.
  3. Optionally make the customer share their purchase to at least 1 social network before receiving their discount
  4. Optionally set a minimum purchase amount before the customer is rewarded with a discount
  5. Optionally send the discount to the customer when they are rewarded with a discount
  6. Use the plugin as a simple sharing tool without the need to reward customers with discounts
  7. Optionally use a shortcode for finer placement on the purchase confirmation page
  8. Customize the reward email
  9. Customize the twitter message
  10. Customize the default sharing title, default sharing message, reward title, reward message, reward sharing title, reward sharing message, reward sharing thanks title and reward sharing thanks message.

Download EDD Purchase Rewards from the WordPress repository. If you’re a developer and wish to contribute, it’s also hosted on GitHub.

Linking gallery images to the attachment page in Easy Image Gallery

This tutorial will show you how to link each image to the attachment page, instead of using the lightbox functionality.

Easy Image Gallery can either open your gallery images in a lightbox, or simply display them with no links. A user contacted me today asking if it’s possible to link each image to the attachment page, instead of using the lightbox functionality.

To do this, copy the following function into your child theme’s functions.php (mind the opening PHP tag) or custom plugin:

Note: if you need to add a CSS class on the anchor link, simply comment out the line of code shown in the code snippet and edit accordingly.

You can download Easy Image Gallery from

How to change a payment gateway’s checkout label in Easy Digital Downloads

This tutorial will show you how you can change a payment gateway’s checkout label. This is the text that appears next to the radio input when there are multiple payment options.

For example, if you’re using the 2Checkout payment gateway, the checkout label says “2Checkout” by default. You might like to change this to “Credit Card”.

All of the payment gateways built for Easy Digital Downloads should be using a filter called edd_payment_gateways to register their gateway’s text labels for both the admin and checkout page. You’ll need to look inside the plugin to get the exact value for which the plugin has registered itself under as shown in the example below. This can easily be done by searching for the filter name.

The code

Copy and paste the following function (mind the opening PHP tag) into your child theme’s functions.php or custom plugin:

Here’s another example of changing the text, but this time for the Check payment gateway. A customer of the EDD forums requested “Checks” be “Bank Deposit”.

fancyBox and Easy Image Gallery v1.1

Up until this point, Easy Image Gallery has been packaged with fancyBox 2. Unfortunately I completely overlooked the licensing of fancyBox 2, which is licensed under the Creative Commons license. Non-GPL licensed software cannot be hosted on the WordPress repository and because of this, I’ve replaced fancyBox 2 with fancyBox 1, which is GPL licensed.

If you’d like to add fancyBox 2 back into the plugin, simply download the free Easy Image Gallery Extend plugin. After activation, you’ll find fancyBox 2 (as well as Colorbox) under the plugin’s settings.

Different thumbnail sizes for each post type with Easy Image Gallery

By default, Easy Image Gallery uses the thumbnail image size for the thumbnail images in the gallery. Here’s how you can specify a different thumbnail size for each post type. For example, you could use one size for Posts, and a completely different size for Pages.

Copy and paste the following function below (mind the opening PHP tag) into your child theme’s functions.php or custom plugin, and adjust the values as required for each post type. You can also easily add your own custom post types if you have any. This code required Easy Image Gallery v1.0.5 or newer.

Hide event tickets with EDD Tickets and EDD Hide Download

If you’re using Easy Digital Downloads in combination with EDD Tickets and The Events Calendar to sell tickets to your events, you’re probably familiar with how the tickets are created.

Each ticket you create on an event appears as a download, and stored under EDD’s downloads section in the WordPress admin. Because of this, if you happen to sell both event tickets and digital downloads on your website, you’ll end up with tickets appearing alongside your downloads, which may not be ideal.

My free EDD Hide Download plugin works exceptionally well for hiding downloads, and because tickets are just downloads, you can easily hide each ticket by enabling a checkbox.

However, there’s one slight problem we need to fix. By hiding the tickets, they also become hidden on the actual event pages. To easily fix this issue, simply copy and paste the following (mind the opening PHP tag) into your child theme’s functions.php or a custom plugin.

Filter the sharing URL in EDD Social Discounts

With v2.01 of EDD Social Discounts a new filter was introduced for modifying the sharing URL. By default, when a user shares your product to one of the various sharing services, only the product’s URL is shared.

One great use case of this new filter is to automatically append a string to the sharing URL. This makes it possible for you to better track customer purchases through services such as Google Analytics.

Paste the following function below (mind the opening PHP tag) into your child theme’s functions.php or custom plugin. Modify the string accordingly to suit your needs.

Modify the redirect in EDD Hide Download

EDD Hide Download has been updated to v1.1.5 and included is a new filter for redirecting the user when a download is set to Disable direct access to this download.

This means that instead of just redirecting to the site’s homepage, you can now specify a completely different page or URL. You can even redirect on a per download basis.

Copy and paste the function you need into your child theme’s functions.php or a custom plugin.

Change the global redirect:

Redirect the user on a per download basis: