latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Skip confirmation by default

Home Forums Community Forum Unofficial Extensions/Hacks Skip confirmation by default

This topic contains 2 replies, has 2 voices. Last updated by  Santi Azpilicueta 4 years, 10 months ago.

Topic Author Topic
Posted: Saturday Mar 3rd, 2012 at 9:06 pm #7201

Hi,

I suspect I might not be the only one wanting to disable the download confirmation message by default (particularly when you configure s2member for unlimited downloads).

Find below my solution for making the shortcode [s2File /] to default to skip_confirmation=”yes”

Add to your theme funtions.php, or to s2hacks:

add_action ("ws_plugin__s2member_before_sc_get_file","s2file_skip_confirmation_by_default");
function s2file_skip_confirmation_by_default($vars){
	if (!array_key_exists("skip_confirmation",$vars["attr"])) $vars["attr"]["skip_confirmation"]="yes";
}

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Tuesday Mar 6th, 2012 at 4:40 am #7436
Staff Member
Santi Azpilicueta. Forum rank/icon updated to Experienced User. Thank you!

Note. There is also a JavaScript Global that can be set once, and it will automatically disable ALL confirmations sent by s2Member (automatically). Here is an example.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
( these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins )

<?php
add_action("wp_head", "s2_skip_confirmation"); function s2_skip_confirmation()
	{
		echo '<script type="text/javascript">';
		echo 'var ws_plugin__s2member_skip_all_file_confirmations = true;';
		echo '</script>';
	}
?>
Posted: Tuesday Mar 6th, 2012 at 4:51 am #7438

Wow, cool, I have to look into javascript Globals in detail!

My guess is this will not allow to override this setting with the shortcode… You would have to override it with inline javascript I guess, correct?

Thanks!

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

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.