Hide Discount Code Field in Easy Digital Downloads

Coupons are a great way to convert those “on the fence” shoppers. But research has shown that the presence of a “discount code” field on your checkout page can slow buyers down and (sometimes) lose you money.

In this tutorial, I give you the code to hide the discount code field in Easy Digital Downloads. I’ve included a few example URLs that allow you to pass in a code via URL so that your site can still run a promotional offer.

Hide Discount Code Field in Easy Digital Downloads

Include Discount Code in URL

Easy Digital Downloads supports adding a discount code to the cart via URL. Here are two example URLs that show you how to pass a discount code through to the checkout page via URL attribute:

Direct URL to the cart page with the coupon code ‘loyal’.

http://sitewidesales.local/checkout/?discount=loyal

Add a specific download (by ID) to the checkout and automatically apply the coupon code ‘loyal’. This is a great way to drive checkout conversions for a single product on sale.

http://sitewidesales.local/checkout/?edd_action=add_to_cart&download_id=319&discount=loyal

The Code Recipe

Adding the Recipe to Your Website

You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. We have a post on how to create a customizations plugin on our partner website, Paid Memberships Pro.

Before and After Screenshots

Easy Digital Downloads Cart Screenshot with a Visible Coupon Code Field
Easy Digital Downloads Cart Screenshot with a Visible Coupon Code Field
Easy Digital Downloads Cart Screenshot with No Coupon Code Field
Easy Digital Downloads Cart Screenshot with No Coupon Code Field

Run a Better Sale with Easy Digital Downloads

Sitewide Sales is a new way to run sales for your WordPress-powered ecommerce site. Using Sitewide Sales, you can set up an active promotion that runs from your set start time and end time.

The plugin automatically applies discounts according to the rules you set up—no coding required. If you want to run a true sale that automatically applies a discount without the need for manual coupon entry, you need try the Sitewide Sales plugin—it works with Easy Digital Downloads and other popular ecommerce plugins for WordPress.

SHARE YOUR LOVE
Kim Coleman
Kim Coleman

Hi! I'm Kim Coleman, an internet entrepreneur from Reading, PA. I've been working with WordPress for over 15 years. In 2011, I founded Paid Memberships Pro, a complete plugin for Recurring Subscriptions and Content Restriction with 100k active sites. I'm currently working on our new product, Sitewide Sales.

Articles: 35