How To Set Up a Free Download with Email Capture in your WooCommerce Shop

Buffer this pageTweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone

Free Downloads in WooCommerce

I’ve had some clients in the past who wanted to set up a free download in their WooCommerce store, as an email list building strategy.

In reality it can be a little cumbersome to do a free download in exchange for an email address within a store context because it takes several more clicks on the part of the user, than it would for a typical opt-in form. The steps I provide here will significantly streamline the process. I wouldn’t recommend it as your only opt-in process, but if you really want/need to use your WooCommerce store for this, the method below will certainly ease the pain points.

In one of his two posts about the pros and cons of this method, Doug Smith presents some interesting reasons you might want to do it this way.

What’s wrong with just setting a product to zero dollars?

A few things. If you don’t make any customizations to the process, you’ll have the following problems:

  • Even though the customer doesn’t have to make a payment, they still have to go through the usual checkout flow which can be several pages…
  • …And WooCommerce will still ask them for their billing info!
  • You’ll have their email address as part of the order info, but you’ll have to manually add it to your email marketing software.

But, with the 4 easy tweaks below, we can fix these issues and make the process much smoother.

1. Set up your free product in WooCommerce by giving it a price of zero.

I’m assuming you’re giving away something like a free ebook or other downloadable item. So make sure you’ve marked it as Virtual and Downloadable, to make sure shipping is removed from the process.

WooCommerce - Set Up a Free Product


2. Remove unnecessary billing fields from the checkout page.

By default, your checkout page is going to look something like this:

WooCommerce Unmodified Checkout Page
That’s a lot of unnecessary info for a freebie!

There are 2 ways you can modify this page.

One is by using this plugin: WooCommerce Checkout for Digital Goods. It gives you a simple interface to choose which fields to hide, and it works well. I tried some other plugins but they were overkilll for this particular purpose.

The other method is to copy/paste the following code, either in your child theme’s functions.php, in your own custom functionality plugin or in the My Custom Functions plugin.
The code is mostly courtesy of Skyverge, but has been tweaked a little to accomodate recent changes in WooCommerce:

After you’ve implemented that code, the checkout page will now look like this – much more compact:

WooCommerce Modified checkout page

3. Slim down the checkout process

By default, after a product is added to the cart, the customer has to look at the cart page, then the checkout page, then complete payment. Again, that’s pretty cumbersome for a free download. Instead, let’s send the user directly to the checkout screen when they add the free download product to their cart.

To use this method, you should disable the WooCommerce option:
“Enable AJAX add to cart buttons on archives”

You will also need to grab the product ID of your free download. You can find the product ID on the All Products page:

WooCommerce Product ID
Add the following piece of code (in the same place you used for the previous step) , making sure to edit line 13 with the product ID of your free WooCommerce download.

This code is courtesy Jeroen Sormani

4. Integrate with your email marketing system

The final, and most important piece of this is integrating with your existing email marketing system. The whole point of giving away freebies is to build your opt-in list. So when the visitor enters their email address on the checkout page, you need to be able to capture it and send it to your email marketing system. I always use Mailchimp, and it’s easy to integrate with WooCommerce.

There are 2 approaches to this:

  1. Automatically opt-in users when they get the free download.
    To do this and not be spammy about it, you have to have clear wording on your product page that lets people know that by accepting the free download they are also opting in to your email list.
  2. You can place a check box during the checkout process that your visitor will have to check (or un-check if they don’t want it).

You can use the following plugin to integrate your WooCommerce store with your Mailchimp account and can configure it to auto opt-in, or display a checkbox as you prefer :

So there you have it – now you can use free downloads in your WooCommerce store to build your email list :)


Weekly WordPress Tips To Your Inbox

+ Get 50% Off The Beginner's Guide to SEO Ebook!
  • This field is for validation purposes and should be left unchanged.
Buffer this pageTweet about this on TwitterShare on FacebookShare on Google+Share on LinkedInEmail this to someone

This Post Has 8 Comments

  1. realangel

    I am having trouble with the code snippet, I am getting error messages when attempting to checkout the free item saying that certain fields that were removed are still required, for example the Billing Country, Street Address, Phone, etc.

    I’m working in a child theme created from Child Theme Configurator and have tried putting the code in both the Editor functions.php file and seperately in the My Custom Functions plugin and both work for the other functions implemented, but still show the required fields error message.

    1. Lucy

      FYI – the code has been updated and should work again, now.

  2. Gregg Davis

    Hi, I’ve been using your code snippet for free product streamlining, and it’s excellent. I even teach it in my course on Udemy.

    With the newest WooCommerce update (3.1.2 to 3.2.1) the snippet is no longer working. Instead of allowing the user to enter just the name and email fields, even though the other fields are not present on the checkout page, there’s a Required Fields” error that doesn’t allow the user to move on.

    Do you have a suggestion?

    1. Lucy

      Hi Gregg, I’ve updated the code, should be fine now!

      1. shivam from udemy

        no it give a erorr a fatal errror

        1. Lucy

          It works for me, so something else is going on. Can you use to share your whole code block please

  3. Pingback: The BobWP eCommerce Wrap-up: May 27, 2016

  4. Pingback: Weekly Roundup: May 27, 2016 – Sell with WP

Leave a Reply

Your email address will not be published. Required fields are marked *