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.

Need API for expired member redirect

Home Forums Community Forum Need API for expired member redirect

This topic contains 1 reply, has 2 voices. Last updated by  Bruce 4 years ago.

Topic Author Topic
Posted: Thursday Dec 13th, 2012 at 10:10 pm #34507

Hello again…

According to your instructions in a previous thread (http://www.s2member.com/forums/topic/renewing-memberships) in order to redirect expired members to a “you’re expired – renew membership” page we would need to create an api to do this. My developer is not capable of doing this so I’m hoping you can help. Can you create the api for me? I would be willing to pay for this service if necessary. We would also need you to provide detailed instructions on where/how to place this api and set it up. Or, i’ll just give you access and I’m sure you could do it in 5 minutes.

Here’s how it should work:

We have one membership level with a one year term (we’ve set this to member level 1). Upon expiry this member is demoted to level zero and therefore redirected to the renew page. On that page he can click on a link which will take him to a renewal form which is pre-populated with his info. (does this have to be a billing modification form or can it be a registration form?)

We need your help with the api. If for some reason you cannot create the api for us please refer me to someone who can.

Thanks.

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Friday Dec 14th, 2012 at 2:50 pm #34693
Bruce
Username: Bruce
Staff Member

Hi Mark,

A simple shortcut way to do this would be to set up code on your Login Welcome Page (install a PHP Execution plugin) like this:

if(current_user_can('access_s2member_level1')) // User is a paid member
	update_user_meta( get_current_user_id(), 's2_is_paid_member', true);

Now, you can do the following below this:

if(!current_user_can('access_s2member_level1') && get_user_meta(get_current_user_id(), 's2_is_paid_member', true)) // User is not a paid member
	wp_redirect('http://mysite/correct/page');
	exit();

We need your help with the api. If for some reason you cannot create the api for us please refer me to someone who can.

If you’re uncomfortable working with code w/ s2Member, we recommend posting your job on http://jobs.wordpress.net/, and/or http://elance.com/

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