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

edd_update_option

Options specific to Easy Digital Downloads are stored in an array in a single WordPress option. For this reason it’s best to use
edd_update_option() to change those options. edd_update_option() safely filters and updates an existing option.

Input

edd_update_option() takes two input variables. The first is the key name of the option desired.  The second is the value that should be stored in the option. The second value defaults to false. Example:

edd_update_option( $key = '', $value = false )

Usage

Here’s an example, updating the position of the currency indicator.  By default it’s set to ‘before’, this example will set it to ‘after’.

edd_update_option( 'currency_position', 'after' );

Output

This function returns true if the option is updated, otherwise false.

Read our latest blog post:
How To Sell Excel Or Google Spreadsheets