You appear to be a bot. Output may be restricted
Description
Show a download's files in the purchase receipt
Usage
$boolean = edd_receipt_show_download_files( $item_id, $receipt_args, $item );
Parameters
- $item_id
- ( int ) required – The download ID
- $receipt_args
- ( array ) required – Args specified in the [edd_receipt] shortcode
- $item
- ( array ) optional – Cart item array
Returns
boolean
Source
File name: easy-digital-downloads/includes/checkout/template.php
Lines:
1 to 33 of 33
function edd_receipt_show_download_files( $item_id, $receipt_args, $item = array() ) { $ret = true; /* * If re-download is disabled, set return to false * * When the purchase session is still present AND the receipt being shown is for that purchase, * file download links are still shown. Once session expires, links are disabled */ if ( edd_no_redownload() ) { $key = isset( $_GET['payment_key'] ) ? sanitize_text_field( $_GET['payment_key'] ) : ''; $session = edd_get_purchase_session(); if ( ! empty( $key ) && ! empty( $session ) && $key != $session['purchase_key'] ) { // We have session data but the payment key provided is not for this session $ret = false; } elseif ( empty( $session ) ) { // No session data is present but a key has been provided $ret = false; } } return apply_filters( 'edd_receipt_show_download_files', $ret, $item_id, $receipt_args, $item ); }