Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function check_download( $can, $download, $version ) {
- // Do stuff here
- if ( ! $can ) {
- add_filter( 'dlm_access_denied_redirect', function( $redirect ) use ( &$download ) {
- return wp_fusion()->access->get_redirect( $download->get_id() );
- } );
- }
- return $can;
- }
- add_filter( 'dlm_can_download', 'check_download', 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement