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.

About: mohi khanna

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing topic 1 (of 1 total)
Topic Count Last Reply
skip login welcome & membership options pages

By:  Gary Cribb in: Community Forum

voices: 3
replies: 5

3 years, 6 months ago  mohi khanna

Viewing topic 1 (of 1 total)

My Latest Replies (From Various Topics)

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Monday Jul 8th, 2013 at 5:41 pm #53130

I have used the above code.

<?php

function no_mp_redirect(){
	wp-redirect(site_url('wp-login.php?action=register'));
}

add_action('ws_plugin__s2member_before_membership_options_page','no_mp_redirect'); //This is a hook
add_action('ws_plugin__s2member_before_wp_redirect_w_mop_vars','no_mp_redirect'); //This is another hook in the same class... I'm not sure which is the best to use.

?>

but i get the error –
Fatal error: Call to undefined function redirect() in /home/content/43/11414443/html/playandwin/wp-content/mu-plugins/s2-hacks.php on line 4

The i searched on google and found that function is actually wp_redirect in place of wp-redirect. So i changed code to following-

<?php

function no_mp_redirect(){
	wp_redirect(site_url('wp-login.php?action=register'));
}

add_action('ws_plugin__s2member_before_membership_options_page','no_mp_redirect'); //This is a hook
add_action('ws_plugin__s2member_before_wp_redirect_w_mop_vars','no_mp_redirect'); //This is another hook in the same class... I'm not sure which is the best to use.

?>

Now when i navigate to authenticated pages in site, then error does not come, but yet membership options page shows.

Viewing 1 replies (of 1 total)

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.