The do_not_force Filter

The do_not_force filter lets you choose to redirect to a download instead of serving it via PHP. This is useful for large files which cannot be downloaded reliably.

You can turn off download forcing via a function in your theme’s functions.php. So for example, if your download ID was 25 you could use:

add_filter( 'dlm_do_not_force', 'do_not_force_by_id' );

function do_not_force_by_id( $do_not_force, $download ) {
	if ( '25' == $download->id ) {
		return true;
	}

	return $do_not_force;
}

To not force all downloads it’s easier:

add_filter( 'dlm_do_not_force', '__return_true' );

Was this article helpful?
Start Protecting your WordPress Downloads

Protect and track downloads on WordPress... What are you waiting for?