Login
Get Started

Easy Digital Downloads Documentation

Documentation, Reference Materials, and Tutorials for Easy Digital Downloads 

edd_price()

This function will output a nicely formatted price of any specified download. It accepts three parameters:

  • A download id, for the download whose price should be displayed
  • An echo boolean. Defaults to true.
  • A price id for variable pricing. Defaults to the first variation

Example:

edd_price( 12 ); // will output something like $10 for product 12

$edd_price = edd_price( 12, false ); // stores the amount for download id 12 in $edd_price

edd_price( 12, true, 1 ); // echos the price of the first variation on download id 12

The price amount is formatted with the currency set in the plugin options, as well as the currency sign position.

For an example of using this in a theme,
see here.

Was this article helpful?
[sp_template_part id="1831271"]

Copyright © 2025 Sandhills Development, LLC