Adding a downloadable file to a product

WooCommerce is just as good to sell virtual products as it is to sell physical products. The beauty of the way it's set up is that any product type can be a virtual product. It could be a simple product, a variable product, a subscription product (which we'll cover in Chapter 4, Running a Membership Site), and so on. WooCommerce handles all of the download permissions. Fulfilling virtual products is completely automated. As soon as you receive payment, the customer receives an email with a special link to download to the file.

The simple product I set up in previous recipes is a poster. I could change this product so that it includes a digital download in addition to the physical product or I could even change it so that the customer only receives a digital download and there is no physical product shipped.

Getting ready

Make sure you already have a simple product in your store.

How to do it…

In the first section, I'm going to add a downloadable file to a product. The customer will receive the download immediately and the physical product after it's shipped. In the second section, we'll show you how to make the product only sell a downloadable file and skip the whole shipping process. Let's have a look at the following steps:

  1. In the WordPress admin, click on the Products menu and navigate to your product.
  2. Under the Product Data panel, you'll see a Downloadable checkbox. Check it.
    How to do it…
  3. Under Downloadable Files, click on the Add File button. You can add as many downloadable files as you wish.
  4. The File URL will automatically be filled in. You can now enter a friendly name for the file that the user will see. This could be something like woo-poster.
    How to do it…

    At this point, you can fill in the additional download settings. This is purely optional. Some store owners like to lock down the downloads, preventing them from being downloaded too many times.

    If you have a product that's purely virtual and doesn't ship any physical component, there's a little bit more we should do.

  5. On the Product Data panel, check the Virtual checkbox.
    How to do it…

Now your product will skip the shipping process altogether. Note that the shipping tab on the Product Data panel has disappeared since there are no shipping settings for virtual products.

We haven't looked at orders yet, but it's worth mentioning that any orders that are composed entirely of downloadable and virtual products will be automatically marked as completed.

Tip

Most users don't have to change the download default settings but, if you want to take a look, they are all available in the WordPress admin under WooCommerce | Settings | Products | Downloadable Products.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset