",
"payment_id": 12345,
"customer_name": "John Doe",
"customer_email": "john@sample.com",
"price_id": "2"
}
```
--------------------------------
### Implementing a callback for edd_complete_purchase
Source: https://easydigitaldownloads.com/docs/edd_complete_purchase.md
Use this example to retrieve payment meta and cart details when a purchase is completed.
```php
function pw_edd_on_complete_purchase( $payment_id ) {
// Basic payment meta
$payment_meta = edd_get_payment_meta( $payment_id );
// Cart details
$cart_items = edd_get_payment_meta_cart_details( $payment_id );
// do something with payment data here
}
add_action( 'edd_complete_purchase', 'pw_edd_on_complete_purchase' );
```
--------------------------------
### Retrieve Product-specific Sales
Source: https://easydigitaldownloads.com/docs/edd_payment_stats.md
Example of fetching sales for a specific download ID over a date range.
```php
// Sales for download ID 44 from July 2 to August 5, 2013
echo $stats->get_sales( 44, 'July 2, 2013', 'August 5, 2013' );
```
--------------------------------
### Sales Stats for Individual Product Query and Response
Source: https://easydigitaldownloads.com/docs/edd-rest-api-stats.md
Example of querying sales stats for a specific product ID.
```text
https://yoursite.com/edd-api/stats/?key=c281cf0a95be875d9eeb284fb004c938&token=5f9432f3ffa5945755ebc66179810d70&type=sales&product=16
```
```json
{
"sales": [
{
"simple-notices-pro": "48"
}
]
}
```
--------------------------------
### Retrieve Best Selling Products
Source: https://easydigitaldownloads.com/docs/edd_payment_stats.md
Example of fetching the top selling products as an array of objects.
```php
$best_selling = $stats->get_best_selling( '10' );
```
--------------------------------
### Example Permalink Structure with index.php
Source: https://easydigitaldownloads.com/docs/ios-app.md
This structure is known to cause 404 errors when connecting to the iOS app.
```text
/index.php/%year%/%monthnum%/%day%/%postname%/
```
--------------------------------
### Sales Stats by Date Query and Response
Source: https://easydigitaldownloads.com/docs/edd-rest-api-stats.md
Example of querying sales stats for a specific date.
```text
https://yoursite.com/edd-api/stats/?key=c281cf0a95be875d9eeb284fb004c938&token=5f9432f3ffa5945755ebc66179810d70&type=sales&date=today
```
```json
{
"sales": {
"today": 1
}
}
```
--------------------------------
### Display and Store Download Prices
Source: https://easydigitaldownloads.com/docs/edd_price.md
Examples showing how to output prices directly, store them in a variable, and access specific price variations.
```php
edd_price( 12 ); // will output something like $10 for product 12
```
```php
$edd_price = edd_price( 12, false ); // stores the amount for download id 12 in $edd_price
```
```php
edd_price( 12, true, 1 ); // echos the price of the first variation on download id 12
```
--------------------------------
### Retrieve Product-specific Earnings
Source: https://easydigitaldownloads.com/docs/edd_payment_stats.md
Example of fetching earnings for a specific download ID on a specific date.
```php
// Earnings for download ID 52 for December 5, 2012
echo $stats->get_earnings( 52, '12-05-2012' )
```
--------------------------------
### Get Recurring Customer IDs
Source: https://easydigitaldownloads.com/docs/recurring-payments-developer-edd_recurring_subscriber.md
Example of the array structure returned by get_recurring_customer_ids and the associated filter hook.
```php
Array
(
[stripe] => cus_85YmUU1QuH5yxY
)
```
```php
apply_filters( 'edd_recurring_customer_ids', $ids, $this );
```
--------------------------------
### Sales Stats Query and Response
Source: https://easydigitaldownloads.com/docs/edd-rest-api-stats.md
Example of a basic sales query and its corresponding JSON response.
```text
https://yoursite.com/edd-api/stats/?key=c281cf0a95be875d9eeb284fb004c938&token=5f9432f3ffa5945755ebc66179810d70&type=sales
```
```json
{
"sales": {
"current_month": 1,
"last_month": 18,
"totals": 71
}
}
```
--------------------------------
### Display downloads with default configuration
Source: https://easydigitaldownloads.com/docs/downloads-shortcode.md
Use the basic shortcode to output downloads in a three-column grid with default settings.
```text
[[downloads]]
```
--------------------------------
### Initialize Theme License Handler
Source: https://easydigitaldownloads.com/docs/software-licensing---updater-implementation-for-wordpress-themes
Registers the theme with the Software Licensing SDK and loads the required SDK files from the vendor directory.
```php
/**
* This is just a demonstration of how theme licensing works with
* Easy Digital Downloads.
*
* @package EDD Sample Theme
*/
/**
* Load theme updater functions.
* Action is used so that child themes can easily disable.
*/
/**
* Initialize the theme license handler and updater.
*
* This registry handles activating and deactivating the license key,
* as well as checking for updates to the theme.
*/
add_action(
'edd_sl_sdk_registry',
function ( $init ) {
$init->register(
array(
'id' => 'edd-sample-theme',
'url' => 'https://edd.local',
'item_id' => 36894,
'version' => '1.0.0',
'file' => __FILE__,
'type' => 'theme',
)
);
}
);
// Load the SDK from the vendor directory. The SDK handles autoloader setup automatically.
if ( file_exists( __DIR__ . '/vendor/easy-digital-downloads/edd-sl-sdk/edd-sl-sdk.php' ) ) {
require_once __DIR__ . '/vendor/easy-digital-downloads/edd-sl-sdk/edd-sl-sdk.php';
}
}
```
--------------------------------
### Campaign Data Output Example
Source: https://easydigitaldownloads.com/docs/campaign-tracker
The rendered output of the {campaign_info} tag when campaign data is present on an order.
```text
Campaign Information:
Campaign: summer_sale_2027
Source: facebook
Medium: social
```
--------------------------------
### Create customers
Source: https://easydigitaldownloads.com/docs/wp-cli-commands.md
Commands to create single or bulk customers with optional email, name, and user ID parameters.
```bash
wp edd customers --create=1
```
```bash
wp edd customers --create=1 --email=john@test.com
```
```bash
wp edd customers --create=1 --email=john@test.com --name="John Doe"
```
```bash
wp edd customers --create=1 --email=john@test.com --name="John Doe" user_id=1
```
```bash
wp edd customers --create=1000
```
--------------------------------
### GET /edd-api/customers/
Source: https://easydigitaldownloads.com/docs/edd-rest-api-customers.md
Retrieve a list of customers from the shop.
```APIDOC
## GET /edd-api/customers/
### Description
Retrieves a list of customers who have purchased items from the shop.
### Method
GET
### Endpoint
/edd-api/customers/
### Parameters
#### Query Parameters
- **key** (string) - Required - API key for authentication
- **token** (string) - Required - API token for authentication
- **number** (integer) - Optional - The number of customers to return
- **customer** (string) - Optional - The identifier (ID or email) of a specific customer to retrieve
### Response
#### Success Response (200)
- **customers** (array) - A list of customer objects containing info and stats
#### Response Example
{
"customers": [
{
"info": {
"id": -1,
"username": "Guest",
"display_name": "Guest",
"first_name": "Guest",
"last_name": "Guest",
"email": "johnson@test.com"
},
"stats": {
"total_purchases": 2,
"total_spent": "20",
"total_downloads": 0
}
}
]
}
```
--------------------------------
### Load an Existing Download
Source: https://easydigitaldownloads.com/docs/edd_download.md
Initialize the class by passing the specific Download ID to the constructor.
```php
$my_download = new EDD_Download( 1492 );
```
--------------------------------
### Specific Endpoint Request
Source: https://easydigitaldownloads.com/docs/edd-rest-api-endpoints.md
Example of targeting the sales endpoint.
```text
https://example.com/edd-api/sales/
```
--------------------------------
### Get total earnings
Source: https://easydigitaldownloads.com/docs/edd_download.md
Retrieves the total earnings for the download.
```php
$download_earnings = $my_download->get_earnings();
```
--------------------------------
### Register Plugin with EDD Software Licensing SDK
Source: https://easydigitaldownloads.com/docs/software-licensing-updater-implementation-for-wordpress-plugins.md
Initializes the SDK registry and loads the SDK from the vendor directory. Ensure the file path to the SDK matches your project structure.
```php
/**
* Plugin Name: AAA Sample Plugin
* Plugin URI: https://easydigitaldownloads.com
* Description: Illustrates how to include an updater in your plugin for EDD Software Licensing.
* Author: Sandhills Development, LLC
* Author URI: https://easydigitaldownloads.com
* Version: 1.0.0
* License: GNU General Public License v2.0 or later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/
add_action(
'edd_sl_sdk_registry',
function ( $init ) {
$init->register(
array(
'id' => 'edd-sample-plugin', // The plugin slug.
'url' => 'https://edd.local', // The URL of the site with EDD installed.
'item_id' => 83, // The download ID of the product in Easy Digital Downloads.
'version' => '1.0.0', // The version of the product.
'file' => __FILE__, // The path to the main plugin file.
)
);
}
);
// Load the SDK from the vendor directory. The SDK handles autoloader setup automatically.
if ( file_exists( __DIR__ . '/vendor/easy-digital-downloads/edd-sl-sdk/edd-sl-sdk.php' ) ) {
require_once __DIR__ . '/vendor/easy-digital-downloads/edd-sl-sdk/edd-sl-sdk.php';
}
```
--------------------------------
### EDD_Recurring_Subscriber Object Structure
Source: https://easydigitaldownloads.com/docs/recurring-payments-developer-edd_recurring_subscriber.md
Example of the object structure returned after initialization.
```php
EDD_Recurring_Subscriber Object
(
[subs_db:EDD_Recurring_Subscriber:private] => EDD_Subscriptions_DB Object
(
[table_name] => wp_edd_subscriptions
[version] => 1.4.1.3
[primary_key] => id
)
[id] => 11111
[purchase_count] => 19
[purchase_value] => 2173.3
[email] => user@example.com
[emails] => Array
(
[0] => user@example.com
)
[name] => Bob Smith
[date_created] => 2015-06-15 16:38:08
[payment_ids] =>
[user_id] => 1nan1
[notes:protected] =>
[raw_notes:EDD_Customer:private] =>
[db:protected] => EDD_DB_Customers Object
(
[meta_type] => customer
[date_key] => date_created
[cache_group] => customers
[table_name] => wp_edd_customers
[version] => 1.0
[primary_key] => id
)
)
```
--------------------------------
### Retrieve Store-wide Earnings
Source: https://easydigitaldownloads.com/docs/edd_payment_stats.md
Example of fetching earnings for a specific date.
```php
// Store-wide earnings for August 2, 2013
echo $stats->get_earnings( 0, 'August 2, 2013' );
```
--------------------------------
### Define Preset License Keys
Source: https://easydigitaldownloads.com/docs/software-licensing-usage-instructions.md
Example format for entering custom license keys in the Preset License Keys textarea, with one key per line.
```text
customkey1
customkey2
customkey3
customkey4
customkey5
```
--------------------------------
### Create a New Download
Source: https://easydigitaldownloads.com/docs/edd_download.md
Instantiate the class and call the create method to generate a new download product. Arguments compatible with wp_insert_post can be passed to customize the download properties.
```php
$new_download = new EDD_Download;
$new_download->create();
```
```php
$new_download = new EDD_Download;
$download_args = array(
'post_title' => 'My eBook',
'post_content' => 'This is my eBook. Nice long description.',
'post_status' => 'publish',
)
$new_download->create( $download_args );
```
--------------------------------
### GET /edd-api/reviews/
Source: https://easydigitaldownloads.com/docs/reviews-rest-api.md
Retrieves a list of reviews placed on all products from the store.
```APIDOC
## GET /edd-api/reviews/
### Description
Retrieves a list of reviews placed on all products from the store.
### Method
GET
### Endpoint
/edd-api/reviews/
### Parameters
#### Query Parameters
- **key** (string) - Required - API key for authentication
- **token** (string) - Required - API token for authentication
- **review_id** (integer) - Optional - The unique identifier for a specific review
### Response
#### Success Response (200)
- **reviews** (object) - Contains the review data or list of reviews
- **request_speed** (float) - The time taken for the request
#### Response Example
{
"reviews": {
"total": "2",
"most_recent": [
{
"id": "63",
"title": null,
"parent": "60",
"download_id": "1568",
"download_title": "Endless Possibilities",
"rating": null,
"author": "Sunny Ratilal",
"email": "dev@local.dev",
"IP": "172.17.0.1",
"date": "2016-07-20 17:24:48",
"date_gmt": "2016-07-20 17:24:48",
"content": "Replying to test review",
"status": "1",
"user_id": "1",
"type": "reply",
"votes": null
}
]
},
"request_speed": 0.08372688293457
}
```
--------------------------------
### Get download notes
Source: https://easydigitaldownloads.com/docs/edd_download.md
Retrieves the notes associated with a download as a string.
```php
$download_notes = $my_download->get_notes();
```
--------------------------------
### Display products with the [downloads] shortcode
Source: https://easydigitaldownloads.com/docs/faqs.md
Use this shortcode to render a product archive with a specific number of items and column layout.
```text
[downloads number="15" columns="3"]
```
--------------------------------
### Get download type
Source: https://easydigitaldownloads.com/docs/edd_download.md
Returns whether the download is a bundle or default.
```php
$download_type = $my_download->get_type();
```
--------------------------------
### GET /edd-api/v2/products/
Source: https://easydigitaldownloads.com/docs/edd-rest-api-v2-products.md
Retrieves a list of products filtered by category or tag.
```APIDOC
## GET /edd-api/v2/products/
### Description
Retrieves a list of products from the store. Results can be filtered by category or tag using query parameters.
### Method
GET
### Endpoint
https://example.com/edd-api/v2/products/
### Query Parameters
- **category** (string/integer) - Optional - Filter products by category slug or ID.
- **tag** (string/integer) - Optional - Filter products by tag slug or ID.
### Request Example
https://example.com/edd-api/v2/products/?category=ebooks&tag=pdf
```
--------------------------------
### API Response Structure
Source: https://easydigitaldownloads.com/docs/software-licensing-api.md
Example of the JSON object returned by the get_version action.
```json
{
"new_version": "2.0",
"stable_version": "2.0",
"name": "Restrict Content Pro",
"slug": "restrict-content-pro",
"url": "https://edd.com/downloads/restrict-content-pro/?changelog=1",
"last_updated": "2017-01-03 11:59:46",
"homepage": "https://edd.com/downloads/restrict-content-pro/",
"package": "",
"download_link": "",
"sections": "a:2:{s:11:\"description\";s:793:\"Placerat porta in enim, urna cras, adipiscing augue dis lorem, pulvinar, natoque phasellus eu tincidunt, dictumst nunc ut dignissim turpis ac, pulvinar! Massa! Sed, enim, eu ac augue placerat scelerisque! Eu cursus, ridiculus cum nec lorem, natoque lorem dictumst amet! Nunc placerat dapibus enim dignissim, nunc mattis vel? Dolor nascetur placerat ridiculus augue massa porttitor turpis auctor, etiam et nisi pid ridiculus nisi duis ac. Turpis et non, dapibus diam! Placerat vel? Et, velit turpis mus sociis arcu, vel magna. Habitasse elementum elit cum nec est, eu, montes egestas est mattis lacus, turpis urna parturient, egestas, integer augue, penatibus natoque elit, rhoncus mid elementum, integer vut turpis. Et? Nisi pid. Nec, placerat ut tristique lorem a nunc velit nunc est.
n\";s:9:\"changelog\";s:0:\"\";}",
"banners": "a:2:{s:4:\"high\";s:0:\"\";s:3:\"low\";s:0:\"\";}"
}
```
--------------------------------
### Customize Purchase and Login Instructions
Source: https://easydigitaldownloads.com/docs/all-access-creating-all-access-products.md
Add custom text instructions above the purchase and login buttons for users who do not have an active All Access Pass.
```shortcode
[[downloads all_access_customer_downloads_only="yes" buy_instructions="Purchase this to get All Access and unlock this page." login_instructions="If you have already purchased, simply log in!"]]
```
--------------------------------
### Run full order migration via CLI
Source: https://easydigitaldownloads.com/docs/troubleshooting-30-migration.md
Executes the default migration process for all payment objects.
```bash
wp edd migrate_payments
```
--------------------------------
### Review Data Structure
Source: https://easydigitaldownloads.com/docs/reviews-rest-api.md
Example of the JSON response structure for a review object.
```json
"author": "Sunny Ratilal",
"email": "dev@local.dev",
"IP": "172.17.0.1",
"date": "2016-07-19 19:25:22",
"date_gmt": "2016-07-19 19:25:22",
"content": "Well written book",
"status": "1",
"user_id": "1"
},
"request_speed": 0.0022079944610596
}
```
--------------------------------
### Example EDD_Subscription object structure
Source: https://easydigitaldownloads.com/docs/recurring-payments-developer-edd_subscription.md
The structure returned by an empty EDD_Subscription object.
```text
EDD_Subscription Object
(
[subs_db:EDD_Subscription:private] => EDD_Subscriptions_DB Object
(
[table_name] => wp_edd_subscriptions
[version] => 1.0
[primary_key] => id
)
[id] => 0
[customer_id] => 0
[period] =>
[initial_amount] =>
[recurring_amount] =>
[bill_times] => 0
[parent_payment_id] => 0
[product_id] => 0
[created] => 0000-00-00 00:00:00
[expiration] => 0000-00-00 00:00:00
[status] => pending
[profile_id] =>
[gateway] =>
[customer] =>
)
```
--------------------------------
### Hooking into admin_init for License Activation
Source: https://easydigitaldownloads.com/docs/software-licensing-activating-checking-and-deactivating-license-keys-in-wordpress-plugins.md
Use this function hooked to admin_init to detect when the 'Activate License' button is clicked and trigger the remote API request.
```php
function edd_sample_activate_license() {
// listen for our activate button to be clicked
if( isset( $_POST['edd_license_activate'] ) ) {
// run a quick security check
if( ! check_admin_referer( 'edd_sample_nonce', 'edd_sample_nonce' ) )
return; // get out if we didn't click the Activate button
// retrieve the license from the database
$license = trim( get_option( 'edd_sample_license_key' ) );
// data to send in our API request
$api_params = array(
'edd_action'=> 'activate_license',
'license' => $license,
'item_name' => urlencode( 'My Plugin Name' ), // the name of our product in EDD
'url' => home_url()
);
// call the custom API.
$response = wp_remote_post( 'https://easydigitaldownloads.com', array( 'timeout' => 15, 'sslverify' => false, 'body' => $api_params ) );
// make sure the response came back okay
if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
if ( is_wp_error( $response ) ) {
$message = $response->get_error_message();
} else {
$message = __( 'An error occurred, please try again.' );
}
} else {
$license_data = json_decode( wp_remote_retrieve_body( $response ) );
if ( false !== $license_data->success ) {
if( 'valid' == $license_data->license ) {
update_option( 'edd_sample_license_status', 'valid' );
}
}
}
}
}
add_action( 'admin_init', 'edd_sample_activate_license' );
```
--------------------------------
### Retrieve Store-wide Sales
Source: https://easydigitaldownloads.com/docs/edd_payment_stats.md
Example of fetching total sales for the current month.
```php
// Store-wide sales for this month:
echo $stats->get_sales( 0, 'this_month' );
```
--------------------------------
### Create a custom free download link with shortcode
Source: https://easydigitaldownloads.com/docs/free-downloads-advanced-usage.md
Use the edd_free_download shortcode to wrap custom content like images into a download trigger.
```shortcode
[edd_free_download download_id="123"]YOUR IMAGE HERE[/edd_free_download]
```
--------------------------------
### Add content before product content
Source: https://easydigitaldownloads.com/docs/adding-html-before-or-after-download-product-content.md
Uses the edd_before_download_content hook to output custom HTML before the main product content.
```php
function pw_edd_before_download_content( $download_id ) {
echo 'This is content added before the main product content.';
}
add_action( 'edd_before_download_content', 'pw_edd_before_download_content' );
```
--------------------------------
### Get sales count
Source: https://easydigitaldownloads.com/docs/edd_download.md
Retrieves the total number of completed sales for the download.
```php
$download_sales = $my_download->get_sales();
```
--------------------------------
### Get file price condition
Source: https://easydigitaldownloads.com/docs/edd_download.md
Retrieves the price condition associated with the file.
```php
$price_condition = $my_download->get_file_price_condition();
```
--------------------------------
### Configure Download Arguments
Source: https://easydigitaldownloads.com/docs/edd_payment.md
Default argument structures for adding or removing downloads from a payment.
```php
'quantity' => 1,
'price_id' => false,
'item_price' => 0.00,
'tax' => 0.00,
'fees' => array()
```
```php
'quantity' => 1,
'price_id' => false,
'item_price' => 0.00,
'cart_index' => false,
```
--------------------------------
### Get download limit
Source: https://easydigitaldownloads.com/docs/edd_download.md
Retrieves the maximum number of times a file can be downloaded.
```php
$download_limit = $my_download->get_file_download_limit();
```
--------------------------------
### Instantiate License Objects
Source: https://easydigitaldownloads.com/docs/software-licensing-developer-customizations.md
Use the wrapper method to instantiate license objects with caching, or instantiate the class directly.
```php
// Instantiate a license via ID
$license = edd_software_licensing()->get_license( 2326422 );
// Instantiate a license via the license key
$license_by_key = edd_software_licensing->get_license( '9e21e9a885212f96cccb4d6186541332', true );
// If you pass in an invalid license ID or key you will get 'false' as a response.
$invalid_license = edd_software_licensing()->get_license( -1 );
```
```php
$license = new EDD_SL_License( 2326422 );
```
```php
$license = new EDD_SL_License();
$license->create( $download_id = 0, $payment_id = 0, $price_id = false, $cart_index = 0, $options = array() );
```
--------------------------------
### GET /edd-api/v2/products/
Source: https://easydigitaldownloads.com/docs/edd-rest-api-v2-products.md
Retrieves a list of products from the Easy Digital Downloads store.
```APIDOC
## GET /edd-api/v2/products/
### Description
Retrieves a list of products available in the store. This endpoint does not require an API key or token for publicly available products.
### Method
GET
### Endpoint
/edd-api/v2/products/
### Response
#### Success Response (200)
- **products** (array) - A list of product objects containing info, stats, pricing, files, and licensing details.
#### Response Example
{
"products": [
{
"info": {
"id": 45,
"slug": "pdf-test",
"title": "PDF Test",
"create_date": "2016-05-23 18:44:51",
"modified_date": "2016-06-08 17:30:54",
"status": "publish",
"link": "https://example.com/?post_type=download&p=45",
"content": "",
"excerpt": "",
"thumbnail": false,
"category": [],
"tags": [],
"sku": "AAMAM2016"
},
"stats": {
"total": {
"sales": "0",
"earnings": "0.00"
},
"monthly_average": {
"sales": "0",
"earnings": "0.00"
}
},
"pricing": {
"amount": "1.00"
},
"files": [],
"notes": "",
"licensing": {
"enabled": false,
"version": "",
"exp_unit": "days",
"exp_length": ""
}
}
]
}
```
--------------------------------
### Create a New Customer
Source: https://easydigitaldownloads.com/docs/edd_customer.md
Create a customer record by instantiating the class and calling the create method with an array of arguments.
```php
$customer = new EDD_Customer;
$args = array(
'user_id' => 12
'name' => 'Jose Canseco',
'email' => 'jose@canseco.com',
'payment_ids' => '',
'purchase_value' => '',
'purchase_count' => '',
'notes' => 'Whatever note you'd like',
);
$customer->create( $args );
```
```php
$args = array(
'email' => 'jose@canseco.com',
);
$customer->create( $args );
```
--------------------------------
### GET/POST /?edd_action=activate_license
Source: https://easydigitaldownloads.com/docs/software-licensing-api.md
Activates a license key for a specific product.
```APIDOC
## GET/POST /?edd_action=activate_license
### Description
Used to remotely activate a license key for a product.
### Method
GET or POST
### Endpoint
/?edd_action=activate_license
### Parameters
#### Query Parameters
- **edd_action** (string) - Required - Must be "activate_license"
- **item_id** (integer) - Required - The Download ID of the product
- **item_name** (string) - Optional - The name of the download (alternative to item_id)
- **license** (string) - Required - The license key to activate
- **url** (string) - Optional - The site URL or unique identifier for the licensed site
### Response
#### Success Response (200)
- **success** (boolean) - Indicates if the activation was successful
- **license** (string) - Status of the license
- **item_id** (integer/boolean) - The ID of the item
- **item_name** (string) - Name of the product
- **license_limit** (integer) - Maximum allowed activations
- **site_count** (integer) - Number of current activations
- **expires** (string) - Expiration date of the license
- **activations_left** (string) - Remaining activations
- **checksum** (string) - MD5 checksum
- **payment_id** (integer) - Associated payment ID
- **customer_name** (string) - Name of the customer
- **customer_email** (string) - Email of the customer
- **price_id** (string) - Price ID associated with the license
```
--------------------------------
### Single review response structure
Source: https://easydigitaldownloads.com/docs/reviews-rest-api.md
Example JSON response for a single review lookup.
```json
{
"reviews": {
"id": "61",
"title": "Great read",
"parent": "0",
"download_id": "1566",
"download_title": "eBook",
"rating": "4",
```
--------------------------------
### Restrict content with preview and instructions
Source: https://easydigitaldownloads.com/docs/all-access-shortcodes.md
Displays a preview image and custom instructions for users who do not have access to the wrapped content.
```shortcode
[edd_aa_all_access id="YOUR_ALL_ACCESS_PRODUCT_ID_HERE" preview_image="https://url-to-image.jpg" buy_instructions="Buy Now to unlock access" login_instructions="Already purchased? Login here to unlock access"]
Your restricted content goes here. It can be HTML.
[/edd_aa_all_access]
```
--------------------------------
### Example output of price range
Source: https://easydigitaldownloads.com/docs/showing-the-price-for-a-download.md
The expected output format when using the edd_price_range function.
```text
$15 - $35
```