• Resolved carfis

    (@carfis)


    Hello,
    I’m trying to restore the download confirmation of a file (confirmation JavaScript)

    Some time ago I used this code to skip the confirmation (on mu-plugins), but when I try to change it or delete it, s2member doesn’t display the confirmation popup.

    <?php 
    
    add_action('wp_head', 'disable_s2_js_confirmations');
    function disable_s2_js_confirmations()
    	{
    		echo '<script type="text/javascript">';
    		echo 'var ws_plugin__s2member_skip_all_file_confirmations = true;';
    		echo '</script>';
    	}
    
    ?>

    anyone know how to reset this feature?

    Carlos

    https://wordpress.org/plugins/s2member/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter carfis

    (@carfis)

    Hi,
    I tested to change the download file limit (Download Options > Basic Restrictions) and it works only when the limit is UNLIMITED downloads.

    e.g.
    File Downloads (Level #2 Or Higher):
    999999999 every 365 days

    for this setup doesn’t work:
    File Downloads (Level #2 Or Higher):
    4 every 30 days

    Is that a problem of S2member?

    Thread Starter carfis

    (@carfis)

    Sorry now it works 😉

    I think the problem was that the Level #1 had this setup
    File Downloads (Level #1 Or Higher):
    999999999 every 365 days
    File Downloads (Level #2 Or Higher):
    4 every 30 days

    I changed it to:
    File Downloads (Level #1 Or Higher):
    0 every 0 days
    File Downloads (Level #2 Or Higher):
    4 every 30 days

    and it works 😉

    I used this code:

    add_action('wp_head', 'disable_s2_js_confirmations');
    function disable_s2_js_confirmations()
    	{
    		if (current_user_is("s2member_level3")){
    		echo '<script type="text/javascript">';
    		echo 'var ws_plugin__s2member_skip_all_file_confirmations = true;';
    		echo '</script>';
    		}
    	}

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to restore the JavaScript download confirmation’ is closed to new replies.