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.

Two different membership option pages

Home Forums Community Forum Two different membership option pages

This topic contains 4 replies, has 2 voices. Last updated by  Suhaib Siddiqi 3 years, 11 months ago.

Topic Author Topic
Posted: Monday Jan 14th, 2013 at 7:17 pm #37544

Can one has two different Membership Options page, S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL? so one restricted page call one S2MEMBER_MEMBERSHIP_OPTIONS_PAGE_URL and other restricted page call a different Membership Options page.

Or is there a hack for it?

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Monday Jan 14th, 2013 at 8:59 pm #37552
Bruce
Username: Bruce
Staff Member

Thanks for your great question

s2Member makes it possible to do this, through WordPress’s Hooks and Filters functionality. Find info on using Hooks and Filters here: Knowledge Base » Hacking s2Member® Via Hooks/Filters.

You can find the filter to change the Membership Options Page link within the file /s2member/includes/classes/cache.inc.php at line 105..

An example of how this might look:

http://yoursite.com/my-membership-options-page/’;

return $links;
}
[/hilite]

[note_box]
This is where s2Member gets all links for it’s processes, so if you’d like to dynamically set up the Login Welcome Page, Membership Options Page, or the File Download Limit Exceeded Page, this is the filter you need.
[/note_box]
Posted: Monday Jan 14th, 2013 at 9:08 pm #37554

Thanks Bruce,

After reading your post, I did through s2hack.php in mu-plugin. I used the following:

if (strpos($_SERVER['REQUEST_URI'], 'redirect_to=') !== false && current_user_can('access_s2member_level1') === false) {
		wp_redirect('http://shaadiconnections.com/hotornot-payment/');
		exit;
		

It does redirects to the desired page. I hope it is correct way of doing it.

Posted: Monday Jan 14th, 2013 at 9:17 pm #37556
Bruce
Username: Bruce
Staff Member

Thanks for the follow-up.

After reading your post, I did through s2hack.php in mu-plugin. I used the following:

if (strpos($_SERVER['REQUEST_URI'], 'redirect_to=') !== false && current_user_can('access_s2member_level1') === false) {
		wp_redirect('http://shaadiconnections.com/hotornot-payment/');
		exit;

This also works, but it is outside of s2Member’s normal processes, and therefore is more of a standard redirect than s2Member’s processes. s2Member’s processes add Membership Options Variables (MOP vars) to the URL when it redirects for use on the Membership Options Page. If you’re looking to set this up later, you may find that this causes problems, and you may want to try the method I outlined above.

As long as you’re not using the MOP vars, this method should work just fine for you.

Posted: Monday Jan 14th, 2013 at 9:24 pm #37557

Thanks Bruce,
I am not using MOP vars. I am doing a simple thing, a user register for 24 hours, pay registration fee. After that upload the image to the member area, and fills in description form. I am not a professional programmer. Therefore, I would like to keep it simple, i.e. if it works and serves my purpose then I am happy with it :-)

Viewing 4 replies - 1 through 4 (of 4 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.