PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

php conditional for is user currently subscribed?

s2Member Plugin. A Membership plugin for WordPress®.

php conditional for is user currently subscribed?

Postby craigjb12 » August 3rd, 2011, 4:28 pm

I can't seem to find a php conditional for is user currently subscribed
User avatar
craigjb12
Registered User
Registered User
 
Posts: 29
Joined: July 22, 2011

Re: php conditional for is user currently subscribed?

Postby craigjb12 » August 3rd, 2011, 4:59 pm

I think this works...

Code: Select all

if ($subscr_id = get_user_option ("s2member_subscr_id", $user_id)) {
  echo '<p>As a subscribed member you will be charged according to your billing preferences one year after your last payment. </p>';   
} else {
  echo '<p>You are not currently subscribed.</p>';
}
User avatar
craigjb12
Registered User
Registered User
 
Posts: 29
Joined: July 22, 2011

Re: php conditional for is user currently subscribed?

Postby Cristián Lávaque » August 3rd, 2011, 11:26 pm

Hi Craig.

Well, if you set the EOT behavior to demote the account, then checking his level may be enough to know if he's subscribed. If he's at Level 1 or higher he's subscribed, if Level 0 or lower then not. Would that work?
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 2 guests

cron