edd_append_purchase_link

Append Purchase Link.

Description

edd_append_purchase_link( (int) $download_id ); 

Automatically appends the purchase link to download content, if enabled.

Parameters (1)

0. $download_id (int)
The download id.

Usage

  1. if ( !function_exists( 'edd_append_purchase_link' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'easy-digital-downloads/includes/template-functions.php'; 
  3.  
  4. // The download id. 
  5. $download_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = edd_append_purchase_link($download_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/template-functions.php  
  1. function edd_append_purchase_link( $download_id ) { 
  2. if ( ! get_post_meta( $download_id, '_edd_hide_purchase_link', true ) ) { 
  3. echo edd_get_purchase_link( array( 'download_id' => $download_id ) );