WooCommerce Integration: Add New Downloadable Product

WooCommerce Integration: Add New Downloadable Product

Downloadable products are simple products which have a downloadable component. This can be anything from an audio file to a PDF. You can read more in the official WooCommerce Docs.

In the Add Product Widget article we covered the basics of using the widget to build a form for creating Simple Products. If you haven’t read that yet you should stop and read it through before continuing. In this guide, we will build on that and show you how to make a form that can create downloadable products.

Adding the Widget

Just like we did before, we need a page to host the form. This can be the same page and even the same widget instance as the form for creating regular simple products. If you would like a separate form, create a new page to host it, and add the Add Product Form widget.

Form Fields

To create a Downloadable Product there are a few fields we must use. First, you need the Downloadable field, and to add the URL of the file we need the Downloadable Files field. There are also two more fields that can be added to give more control over the files, though they are not required. These are Download Limit and Download Expiry.

These fields will only be visible to the user after selecting Yes in the Downloadable Product field. Note that only simple products can have the downloadable aspect. This means these fields will be hidden if the user selects any product other than Simple Product in the Product Type field. (Variable products can be downloadable as well, but this is added inside the variations, not at the form level.)

The other fields can be added or removed independently and will have no effect on the Downloadable Product aspect. You can read about them in the Add Product Widget guide

Note that the conditional fields are only rendered in the front end of the web page. In the Elementor preview, all fields will be visible.

Field Specific Options

These fields have the general configuration options that are applicable to all fields, such as Label, Instructions, Required, Hidden, etc. Here we will explain the additional options specific to each field.

Downloadable

This is a simple button where the user indicates they would like to create a downloadable product. Clicking Yes in this field will reveal the other relevant fields.

Downloadable Files

This is where the user will upload the file or add the file URL.

There are three columns: File Name, File URL, and Upload. If the file is hosted on an outside service the URL can be added directly. 

Clicking Upload opens the WP Media Library. If the file is already uploaded to your WordPress media library they can simply choose it from the list. Clicking a file in the media library will copy its respective URL into the URL field of the form. The user can also upload a new file by simply dragging it into the media library window.

There are no unique field options here, the only options are the regular styling choices for all fields, such as Label, Instructions, Required, Hidden, etc.

Download Limit

This optional field allows the user to add a limit to the number of times the file can be downloaded by the customer. Leaving it blank will default to unlimited.

This field also includes all the standard style options.

Download Expiry

This field is also optional. It allows the user to add an expiry date to the download. This is counted in days since the. After the specified number of days, the download link will expire and stop working. Again, leaving it blank will default to unlimited.

This field also includes all the standard style options.

Final Result

This is how the form looks in the Elementor preview:

With more fields visible when you scroll down.

And here is how it looks on the live webpage:

When the user clicks Yes in the Downloadable Product option then the relevant fields will appear.

Simply click Add File and then the files can be added or uploaded.

View More Documentation About Our WooCommerce Integration:

WooCommerce Integration: Add New Downloadable Product

Still stuck? 
Contact our support team here.