public function filter_edd_download_files($value)
{
if (!$this->should_filter_content()) {
// Not filtering content, return
return $value;
}
if (empty($value)) {
// Nothing to filter, return
return $value;
}
foreach ($value as $key => $attachment) {
$url = $this->get_url($attachment['attachment_id']);
if ($url) {
$value[$key]['file'] = $this->get_url($attachment['attachment_id']);
}
}
return $value;
}