You appear to be a bot. Output may be restricted
Description
Retrieve the file downloads
Usage
$array = EDD_Download::get_files( $variable_price_id );
Parameters
- $variable_price_id
- ( integer ) optional –
Returns
array List of download files
Source
File name: easy-digital-downloads/includes/class-edd-download.php
Lines:
1 to 44 of 44
public function get_files( $variable_price_id = null ) { if( ! isset( $this->files ) ) { $this->files = array(); // Bundled products are not allowed to have files if( $this->is_bundled_download() ) { return $this->files; } $download_files = get_post_meta( $this->ID, 'edd_download_files', true ); if ( $download_files ) { if ( ! is_null( $variable_price_id ) && $this->has_variable_prices() ) { foreach ( $download_files as $key => $file_info ) { if ( isset( $file_info['condition'] ) ) { if ( $file_info['condition'] == $variable_price_id || 'all' === $file_info['condition'] ) { $this->files[ $key ] = $file_info; } } } } else { $this->files = $download_files; } } } return apply_filters( 'edd_download_files', $this->files, $this->ID, $variable_price_id ); }