Home / Disable / Hotfix: Free Downloads – Always load assets
Duplicate Snippet

Embed Snippet on Your Site

Hotfix: Free Downloads – Always load assets

In version 2.3.15 of Free Downloads, an attempt was made to only load the Javascript asset files when necessary, however, some sites are using custom links to trigger the free download modals without the usage of the EDD Purchase Link function.

This snippet serves to load the Javascript on every frontend page until a release can be made to resolve this issue.

Code Preview
php
<?php
/**
 * Force loading the Free Downloads assets on the frontend.
 */
function eddwp_free_downloads_scripts() {
	EDD\FreeDownloads\Assets\Frontend::enqueue( true );
}
remove_action( 'wp_enqueue_scripts', 'edd_free_downloads_scripts' );
add_action( 'wp_enqueue_scripts', 'eddwp_free_downloads_scripts' );

Comments

Add a Comment