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.

Raam Dev

Staff Member

My Latest Replies (From Various Topics)

Viewing 25 replies - 101 through 125 (of 2,567 total)
Author Replies
Author Replies
Posted: Friday Nov 23rd, 2012 at 2:38 pm #32443
Raam Dev
Username: Raam
Staff Member

Hi Lee,

Yes, this is possible. However, you’ll need to write a bit of your own PHP code that confirms the ID number and then changes their role (i.e., Level) from s2member_level0 to s2member_level1. This thread on changing roles with PHP should be helpful.

If you’re not comfortable with PHP, we recommend posting a job on jobs.wordpress.net.

Posted: Friday Nov 23rd, 2012 at 2:31 pm #32442
Raam Dev
Username: Raam
Staff Member

First we need to get midnight on the day the user paid:

$midnight_paid_registration_time = strtotime('today', S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME);

The timestamp recorded in $midnight_paid_registration_time will be in Unixtime format, so to figure out if 1 day has passed since that time, you’ll need to add 86400 seconds to the timestamp (there are 86400 seconds in a day). If you want to figure out if 2 days have passed, you need to add 172800 seconds (86400 x 2), and so on.

So here’s how the code might look:

<?php 
// midnight Unix Timestamp on the day the user paid
$midnight_paid_registration_time = strtotime('today', S2MEMBER_CURRENT_USER_PAID_REGISTRATION_TIME);

// Unix Timestamp right now 
$now = time();
?>

<?php if($midnight_paid_registration_time + 86400 < $now){ ?>
	Drip content to Members that started paying you at least 1 day ago
<?php } ?>

<?php if($midnight_paid_registration_time + 172800 < $now){ ?>
	Drip content to Members that started paying you at least 2 days ago
<?php } ?>

<?php if($midnight_paid_registration_time + 259200 < $now){ ?>
	Drip content to Members that started paying you at least 3 days ago
<?php } ?>
Posted: Friday Nov 23rd, 2012 at 2:07 pm #32441
Raam Dev
Username: Raam
Staff Member

Hi Francois,

All s2Member Levels are cumulative, which means higher levels automatically get access to everything granted to lower levels (Level 4 can access everything granted to Level 1, 2, and 3).

The redirect URL that you provided above shows that the user was trying to access something protected by Level 4. If that thing should not be protected by Level 4, I recommend checking all of your URI Restrictions (Dashboard -› s2Member® -› Restriction Options -› URI Access Restrictions).

Posted: Friday Nov 23rd, 2012 at 2:03 pm #32440
Raam Dev
Username: Raam
Staff Member

Thanks for the update, William! Glad to hear you solved this. :)

Posted: Friday Nov 23rd, 2012 at 2:02 pm #32439
Raam Dev
Username: Raam
Staff Member

Reactivating a subscription largely depends on PayPal and some types of cancelled subscriptions cannot be reactivated. You might have some clues in the s2Member logs as to why the payment failed, but you (or the customer) will likely need to contact PayPal to determine that.

If cancellations from failed payments is a common occurrence, you can change the maximum number of failed payments to something higher than the default (2 max failed payments before subscription is canceled) using the rra=”” shortcode attribute. On my personal site, I usually set it to 5 to give the user more time to do something about it (PayPal sends an email to the customer telling them their payment failed with a description of why).

Posted: Friday Nov 23rd, 2012 at 1:56 pm #32438
Raam Dev
Username: Raam
Staff Member

Hi Todd, Moty,

The login bar on s2Member.com was custom coded with JavaScript and CSS specifically for the theme that s2Member.com is using. You’d need to create something similar for your theme. There are WordPress plugins out there that also give you different types of login forms/menus, so you might want to try searching for one that matches what you want.

s2Member uses the WordPress authentication system so any WordPress plugin that allows you to login should work with s2Member.

Posted: Friday Nov 23rd, 2012 at 1:51 pm #32437
Raam Dev
Username: Raam
Staff Member

Hi Paul,

It looks like your site might not be loading the s2Member JavaScript. Those fields should not be appearing if you’ve set accept=”paypal”; only the PayPal option should be showing.

Can you provide us a link to a test page on your site so we can confirm this? Otherwise, please “view source” on that page and look for the JavaScript include line somewhere near the top. Try to visit the URL that’s being loaded; it should return a bunch of JavaScript. If it returns an error, please see Knowledge Base » Mod Security, Random 503/403 Errors.

I also recommend disabling other plugins and temporarily switching to the default WordPress theme to rule out any plugin/theme conflicts. Please see Common Troubleshooting Tips.

Posted: Friday Nov 23rd, 2012 at 1:47 pm #32436
Raam Dev
Username: Raam
Staff Member

Hi Lan,

The WordPress Codex Function Reference page for add_cap() has an example for adding a ccap to a user:

//to add capability to specific user
$user = new WP_User( $user_id );
$user->add_cap( 'can_edit_posts');
Posted: Friday Nov 23rd, 2012 at 1:41 pm #32435
Raam Dev
Username: Raam
Staff Member

Great! Thanks for the update, Dan. Glad to hear you solved this. :)

Posted: Friday Nov 23rd, 2012 at 1:40 pm #32434
Raam Dev
Username: Raam
Staff Member

Hi Tyron,

It’s not currently possible to have two different Pro-Forms on the same page (even if they’re hidden by JavaScript/CSS) because the forms will conflict. Instead, we recommend displaying the different membership plans as buttons (see s2Member Pricing as an example) and then link over to a page that contains just the Pro-Form for that membership type.

Posted: Friday Nov 23rd, 2012 at 1:37 pm #32433
Raam Dev
Username: Raam
Staff Member

Did it put him at Level 1 or Level 0 (Free Subscriber)? If it put him at Level 1, then he must have used a button/form that was configured for Level 1, not Level 3. If he signed up and it shows him as a Free Subscriber, then it could be that PayPal didn’t send the payment confirmation message to s2Member yet (sometimes it can take a little while for PayPal to confirm the payment; in the interim, s2Member puts the user at Level 0 and then automatically upgrades them to Level 3 once PayPal indicates the payment has been confirmed).

If you haven’t already, I highly recommend enabling logging (Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Logging) because looking at those logs will be the next step in attempting to determine the cause of the issue. (If you’ve successfully completed transactions since enabling logging and the log files are empty, then you likely have a problem with the log files or log file directory not being writable by the web server.)

Posted: Friday Nov 23rd, 2012 at 1:31 pm #32432
Raam Dev
Username: Raam
Staff Member

Laurie, Anton, thanks for sharing the code! I’m sure it will help others looking for a similar solution. :)

Awarded Laurie and Anton the Helpful badge.
Posted: Friday Nov 23rd, 2012 at 1:28 pm #32431
Raam Dev
Username: Raam
Staff Member

Thank you for the update, William! Glad to hear you found what you were looking for. :)

Posted: Friday Nov 23rd, 2012 at 1:26 pm #32430
Raam Dev
Username: Raam
Staff Member

Hi Olivier,

Yes, s2Member can handle all of those features. I recommend installing the free version of s2Member (s2Member Framework) and trying it out. We also have lots of tutorial videos that you may want to watch.

Let us know if you have any other specific questions about the features and we’ll be happy to help.

Posted: Friday Nov 23rd, 2012 at 12:51 pm #32428
Raam Dev
Username: Raam
Staff Member

Hi Mike,

s2Member is a WordPress plugin designed to protect WordPress content. I’m not familiar with the “pods framework” or how it works, but I recommend installing the free version of s2Member and testing it out. You might be able to use the URI Restrictions feature (Dashboard -› s2Member® -› Restriction Options -› URI Access Restrictions) to restrict the “pods framework” content.

Posted: Friday Nov 23rd, 2012 at 12:12 pm #32422
Raam Dev
Username: Raam
Staff Member

Hi Andy,

I heard back from the lead developer and here’s what he said:

The only hook that WordPress makes available during mass promotions/demotions, is the underlying set_role action in the WP_Users class. Unfortunately, hooking into this action has some negative repercussions that can cause endless loops for s2Member if we used it this way.

There are a few hackety ways around this, but unfortunately nothing that will be straightforward enough for a maintenance release.

Posted: Wednesday Nov 21st, 2012 at 8:59 pm #32299
Raam Dev
Username: Raam
Staff Member

Hi Pam,

s2Member does not currently have the shopping cart functionality that you describe. As you’re already aware, Custom Capabilities can be used to sell access to multiple things, but the functionality necessary to “collect” all the Custom Capabilities the purchaser wants and then sell them in one go would need to be created by you.

You could do something with PHP sessions where you simply record which “products” the visitors wants and then at checkout you read those session variables and then show a Pro-Form that is configured to sell access to all those Custom Capabilities.

Posted: Wednesday Nov 21st, 2012 at 8:55 pm #32296
Raam Dev
Username: Raam
Staff Member

Hi William,

Those would be the default emails that WordPress itself sends, not s2Member. You might want to start here for a few ideas on how you can customize those emails.

Posted: Wednesday Nov 21st, 2012 at 8:53 pm #32295
Raam Dev
Username: Raam
Staff Member

Hi Laetitia,

No, s2Member does not have that functionality at this time. s2Member uses the WordPress user base, and WordPress itself does not have such a feature.

Posted: Wednesday Nov 21st, 2012 at 8:52 pm #32294
Raam Dev
Username: Raam
Staff Member

Hi William,

No, that feature has not been added yet. The “next major version of s2Member” that Cristian mentions in that post is still under development. We do not yet have a release date set.

Posted: Wednesday Nov 21st, 2012 at 8:50 pm #32293
Raam Dev
Username: Raam
Staff Member

Hi Paul,

I’m not sure what you’re referring to. Both of those links go to a page that just says “Our new website is almost ready! For the time being please go to screeneditors.com”. Can you please take a screenshot and show that here so we can better understand how to help?

Posted: Wednesday Nov 21st, 2012 at 8:48 pm #32292
Raam Dev
Username: Raam
Staff Member

If we use s2member Pro with PayPal Express Checkout, what’s the workflow for the user? Do they fill out all the registration info (name, username, password, etc.) in a form generated through S2member on our site, click over to PayPal to pay and then return to our site’s Login Welcome page once the payment is processed by PayPal?

Yes, that’s correct, except for the last part. They do fill out their details and create their account in the first step, but after paying on PayPal they are returned to your site with a message to login. With s2Member Pro, you also get the success=”” shortcode attribute, which allows you to specify the URL to a page they are sent to after a successful payment on PayPal. On my personal site, I setup a “Thank You” page that includes instructions for logging in, along with a link to the login page, and I specify the URL to that page in my Pro-Form shortcode.

Posted: Wednesday Nov 21st, 2012 at 5:37 pm #32279
Raam Dev
Username: Raam
Staff Member

Hi Goh,

s2Member only restricts front-end content, not back-end features. All of the s2Member Level capabilities are based on the WordPress Subscriber role, which only allows access to viewing content, not publishing/editing it. If you needed to get around this, you might be able to use a Role Editor plugin to manually modify the s2Member Roles to give users those rights but that wouldn’t be supported by s2Member.

Posted: Wednesday Nov 21st, 2012 at 5:26 pm #32278
Raam Dev
Username: Raam
Staff Member

Hi Macks,

Please see s2Member® » Terms » Refund Policy for a complete description of our refund policy.

s2Member Pro is an add-on to the s2Member Framework, so I do recommend fully testing the Framework before purchasing s2Member Pro. With the Framework, you have access to Custom Capabilities and all the various restriction options, so you should be able to get started that way. If you require the s2Member Pro-Forms, you’ll need to purchase s2Member Pro.

Posted: Wednesday Nov 21st, 2012 at 5:22 pm #32277
Raam Dev
Username: Raam
Staff Member

Hi Thomas,

Yes, you should be able to dig into the s2Member code, which is all available for free, and follow how the upgrade/downgrade (aka Billing Modification) is handled by s2Member. Presently, the only remote actions supported by s2Member are new signups through the Remote Operations API (see Dashboard -› s2Member® -› API / Scripting -› Remote Operations API). If you need to recreate things like the upgrade process, you’ll need to dig into the code yourself. (It’s not as simple as a hook because an upgrade/downgrade requires changes to the payment, which requires interactions with the payment gateway).

If you want to handle the entire upgrade/downgrade process within the webapp (including interactions with the payment gateway) and simply update the users WordPress account, you can certainly do that. You’d simply change the users’ role and/or Custom Capabilities, along with the new Subscription/Transaction ID if changes, to reflect the upgrade/downgrade.

Viewing 25 replies - 101 through 125 (of 2,567 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.