Skip to main content
Easy Digital Downloads Documentation
Documentation, Reference Materials, and Tutorials for Easy Digital Downloads

Variable Pricing

Variable pricing is a core feature of Easy Digital Downloads that allows you to define custom price options that are specific to a single product. This functionality is a subset of
creating a product.

While variable pricing is optional, many stores depend on its functionality to provide a range of purchase options for their customers. Variable pricing oftentimes makes more sense than having separate, related product entries.

Below, we’ll outline what variable pricing is [and is not], its additional settings, front-end behavior, use cases, extension integrations, and more.

What is variable pricing?

As mentioned above, variable pricing gives you the ability to add multiple purchase options to a single product in your store. Let’s look at the two basic ways to implement variable pricing.

Standard variable pricing

When setting up a new product, variable pricing is not enabled by default. The price of your new product is set to $0.00 by default and will remain as such until you change the price, or enable variable pricing.

To enable variable pricing, you must tick the checkbox labeled
Enable variable pricing in the Download Prices section.

Upon enabling variable pricing, a new interface will appear that allows you to enter information about a pricing option one row at a time. At a minimum, each row needs an option name. If the price field is left blank, the price for that option is assumed to be $0.00.

Additionally, after creating multiple pricing options, you can set one particular option as the default by clicking the radio button for the corresponding price option under the
Default column.

Here’s an example of a product that uses variable pricing with three price options, one of which is set as the default selection for customers.

This product configuration will allow the customer to purchase either Option One, Option Two, or Option Three. Option Two will be selected by default, though the customer can easily select a different option. The front-end purchase button display will look similar to this:

Notice that the values you provide for
Option Name and Price are used as the labels for the radio buttons. Likewise, the price option you selected as Default will automatically be selected when the page loads.

From here, the customer can either click the purchase button, leaving the selection as-is, or select a different price option before proceeding.
In this standard configuration, only one price option can be selected by the customer. That leads us to the next setting you may have seen in previous screenshots.

Multi-option purchase mode

When you tick the checkbox to enable variable pricing, another checkbox will display below it labeled
Enable multi-option purchase mode. Allows multiple price options to be added to your cart at once.

As the label states, multi-option purchase mode allows the customer to select more than one price option at a time for purchase. Ticking this checkbox will not change anything on the edit screen about how you configure your price options. However, it will change the front-end purchase button to display the price options as checkboxes instead of radio buttons.

This simple change takes advantage of the nature of HTML. In a single HTML form, grouped checkboxes allow for multiple selections at once, while grouped radio buttons do not.

Simply put, the state of your multi-option purchase mode setting determines whether or not your customers can purchase more than one price option [of a single product] at a time.

Note: the front-end display order of your price options can be controlled by clicking and dragging the direction icon that appears to the left of each price option on the edit screen.

Associated product files

Price options do not have to be associated with product files because Easy Digital Downloads itself does not require products to have files. However, when product files are present, you have control over how these files are associated with your new price options.

When you previously ticked the checkbox to enable variable pricing, another change to the interface occurred that you may not have noticed. In the
Download Files section, a new column called Price Assignment was added to the File Downloads area allowing you to directly associate a product file to a price option that has already been created.

Notice that the Price Assignment select menu, which will display for each product file row, has a populated list of your defined price options as well as an
All selection. All, the default selection, means that regardless of what price option the customer purchases, this file will be distributed with the purchase. If you do not configure the Price Assignment, this is the standard behavior.

To associate a product file with one particular price option, you’d select it from this menu. Doing so guarantees that the file will only be distributed to the customer if the associated price option is purchased. No other price option purchase will distribute that file.

Here is an example of a product that has one general product file, and an additional product file associated with each price option:

With this configuration, assuming the customer only purchases one price option, he or she will always receive
two product files regardless of which price option is purchased:

download-item and download-item-{one/two/three}

Variable pricing with Bundles

In the
Creating Products article, you learned about the Product Type Options, allowing you to leave a product set as Default type, or change it to a Bundle.

Bundles are a special type of product that allow you to configure a single product as a way to purchase access to multiple other products. For example, if Product A, Product B, and Product C are all separate product entries with their own pricing and files, you can create Bundle A as a way to buy the aforementioned individual products in one transaction.

Variable pricing works with bundles as well. Nothing changes about the way you configure variable pricing on Bundle A, or any of the other three products. However, after switching the Product Type Option on the bundle, the file upload fields will be replaced by select menus populated with all of the other products from your store, along with their pricing options.

Here’s what the Bundle A configuration could look like:

Conceptually, this is the same as the Default product type in the sense that you are selecting what is being purchased. The key difference is that when configuring a bundle, you are not selecting files, you are instead selecting entire products and/or their price options.

The goal here is to associate
Bundle A price options with entire child products, or the price options of those child products. The screenshot below outlines a common configuration.

To further illustrate what this means, let’s put the above configuration into words.

  • Purchasing Bundle A – Option One grants you access to Product A – Option One, Product B – Option One, and Product C – Option One
  • Purchasing Bundle A – Option Two grants you access to Product A – Option Two, Product B – Option Two, and Product C – Option Two
  • Purchasing Bundle A – Option Three grants you access to Product A – Option Three,Product B – Option Three, and Product C – Option Three

Additionally, if you were to select
Product B itself instead of one of its price options, then all Product B price options would be included in the purchase of the corresponding Bundle A purchase.

Lastly, for any product that is selected to be included in a bundle, whether it be an entire product or its price options, the product files associated with the product (and its appropriate price options) become accessible according to their configuration upon purchase of the bundle.

As you can see, variable pricing configuration is completely optional, but is also packed with default behavior and additional settings that allow you to easily create price options that meet your specific needs. In its simplest form, the above information covers variable pricing. Now let’s cover how one may use variable pricing in the real world.

Common variable pricing use cases

There are dozens, if not hundreds of ways to put variable pricing to use. However, the Easy Digital Downloads team sees certain use cases over and over again. Here are a few cases that put all of the additional settings to use.

Selling music albums

This is probably one of the most common use cases for variable pricing. Independent musicians use Easy Digital Downloads to sell their music albums. Much like the popular service iTunes, these musicians want to be able to sell a complete album as well as individual tracks. Variable pricing with multi-option purchase mode is perfect for that.

If we plan this out before configuring the product, it is clear that the customer should have the option to purchase a single track, multiple tracks at once, or the entire album with all tracks included. From a planning standpoint, the product list would look like this:

  • track 1
  • track 2
  • track 3
  • full album

Notice that the full album is an option just like the individual tracks are. No hierarchy is needed for price options. It’s the product files that hold the structure of what the customer is purchasing. Take a look at this product configuration based on the plans above:

Multi-option purchase mode is enabled to allow multiple individual tracks to be purchased once. The
Full album price option is set to default, because that’s the preferred purchase. Individual product files are associated with the appropriate price options.

The important thing to point out is that the
full-album product file (typically a compressed .zip folder) includes all of the individual tracks. Easy Digital Downloads does not include the other files in one download for you. You would simply package the product files appropriately before uploading them to your product.

Your album is now ready to be distributed using variable pricing with multi-option purchase mode.

Pro tip: add another product file for cover art and set its Price Assignment to
All. 😉

Licensing options

You may recognize licensing options from our very own website. Using the
Software Licensing extension, we provide three price options allowing customers to decide how many license activations they’d like to receive for the extensions they are purchasing.

As you may have guessed, there’s nothing in the default variable pricing user interface that allows you to configure details like license activations for a product being sold. These additional options exist only when added programmatically by extensions.

Here’s a look at the variable pricing options when the Software Licensing extension is activated:

While there is much more to configure when using Software Licensing, the above screenshot illustrates the changes made to the variable pricing rows when the extension is activated. If left untouched for an unlicensed product, the behavior described previously in the article will not change.

However, the screenshot shows how an extension can add new fields and settings that let you define specific details about a variable pricing option. While this is still one product overall, the additional settings provided by Software Licensing allows each price option to behave according to your chosen configuration.

Recurring payment price options

Many other extensions add fields to the price option rows and interact with them logically based on the needed functionality. A few of them even modify the front-end display of price options based on the back-end configuration, like our
Recurring Payments extension.

When a price option is set to be a recurring payment, additional fields are made available to set the specific details of just that price option’s recurring behavior.

With that configuration, notice how you the front-end display of price options have been modified to reflect the subscription details:

As you can see, the possibilities are endless.

Variable pricing FAQs and issues

Below you will find answers to some of the most common questions surrounding variable pricing. If you do not see your concern listed below,
contact support for assistance.

If I assign a new product file to a price option that has already been purchased, will my customers gain access to the new file?


Can I have a default variable pricing configuration that is automatically set for all new products?

While Easy Digital Downloads does not provide this functionality, it is available through a 3rd party extension. Please contact the extension creator if you have questions or concerns.

I run a stock photo site. If I upload a single image, can it set the pricing options based on automatically-created image sizes?

No. Whether we are discussing price options, product files, or both, there is no way to upload a single image file and have it automatically create different image sizes to be set as separate price options. The price options and file associations must be set manually regardless of the product file type.

Can I view detailed stats and earnings reports for variable pricing options?

Not at the moment. This enhancement is a high priority on our development board. However, as of now, price option performance is included in the stats of the entire product.

Is there a limit to the number of price options I can have?

Technically, no. We do not set a limit on the number of price options a single product can have. However, an adjustable limit is usually imposed on the server level.

The product edit screen, like most WordPress admin screens, is simply a large HTML form. Every time you save/update the page, you are essentially clicking the “submit” button on a form. That means each setting on the screen is a form field, whether it be the product title, the checkbox for enabling variable pricing, or even the textarea for Download Notes.

While the vast majority of users will never have an issue, there are some who may need to have hundreds of price options and corresponding product file entries. Considering the fact that each individual price option and file upload row includes multiple individual settings, the number of fields being submitted can quickly reach hundreds, if not thousands.

On your server where PHP is configured, there are several settings and values that your host controls. One of these settings is called
max_input_vars and its value is usually 1000. That is, the maximum number of input values (form fields) that can be submitted at once is 1000. As described above, you may surpass that limit.

In certain cases, hitting that limit will not present any kind of error. Instead, some of the fields on the page will not be saved. As it pertains to variable pricing and your associated files, you may see many of your rows saved correctly up to a certain number with the rest of them missing.

If that situation occurs, you
must contact your host and request to “have
max_input_vars increased to a higher value.” In the past, an increase to 3000 has solved the problem for many. Request a number that you estimate will remove the restriction for your needs.

Does the Custom Prices extension work with variable pricing?


Does the Frontend Submissions extension support variable pricing?


Can I use Item Quantities with variable pricing?


Can I use the [purchase_link] shortcode for a variable pricing option?

Yes. See
the documentation for how to use the price_id parameter.

Can I add a price option to the cart using a custom add to cart URL?

Yes. However, you can only add one price option from one product per URL. See
the documentation for how to build the URL with a price option.

If a customer adds a variable pricing option to the cart and decides to switch options, how does that work?

By default, the only way to switch options once added to the cart is to remove the product from the cart and then re-add the correct selection. A much better solution can be found in the
Variable Pricing Switcher extension.

Can I display variable pricing options as a select menu instead of a list of options?

This requires custom development. However, there is
a code snippet already written that should do the job.