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: Foliovision

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

My Latest Replies (From Various Topics)

Viewing 11 replies - 1 through 11 (of 11 total)
Author Replies
Author Replies
Posted: Thursday Sep 26th, 2013 at 5:14 am #59903

Hello forum admins,

any news about this?

Does this mean I have to update this thread every 2 weeks to be able to discuss this and not get the thread closed


Posted: Friday Mar 1st, 2013 at 11:44 am #43505

Hello Bruce,

thanks, let’s have a look at how it could work:

1. I put up a special form for gift membership. Buyer pays for the gift membership using the form and receives a custom registration link (for fixed length membership) which we can send to whoever should get the gift.

2. However how can I make sure he gets the link? I could put up a special gift page, accessible only after buying the gift membership, but how do I generate the link over there? I see the function in Dashboard -› s2Member® -› PayPal® Pro Forms -› Registration Access Links, but that generates only one link. I need to put this PHP function into the special gift page template.

3. Next, how can I stop the buyer from reloading the special gift page multiple times and always getting a different registration link?

4. Perhaps the special gift page is not the right solution. And the link needs to be in the email. That’s sounds even more difficult. That brings us back to point no. 1. – how can the buyer get the link?


Posted: Thursday Jan 24th, 2013 at 11:25 am #39416

Hello Jason and everybody,

I checked my logs after a couple of days.

1. Regarding the first check which fails often and seems to be related to Security Encryption Key or cookies:

if (($reg_cookies = c_ws_plugin__s2member_register_access::reg_cookies_ok ()) && extract ($reg_cookies) /* Needed? */)

Most of the time, it happens for user agents like Apache-HttpClient/4.0.1 (java 1.5) or similar. Or this one contains McAfee in it: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E; AskTbAD4/; McAfee)

We also got no client complains, so it really looks like just scripts.

2. Regarding the other one which looks like a problem with tiny URL:

if (count ($register) === 6 && $register[0] === "subscr_gateway_subscr_id_custom_item_number_time" /* Does the checksum value match up here? */)

We got 4 of these errors since I added the extra log. Unfortunately, there is no HTTP_REFERER in $_SERVER. However we can see the cookies and the one for Google Analytics (if I’m not mistaken) often contains strings like This applies to 2 errors, then there is one more with McAfee again and one more with 'HTTP_VIA' => '1.1' which looks like some kind of weird proxy.

So it looks like some people share the link on Facebook and some of them user some antivirus which triggers the links. It should be fine.


Posted: Monday Jan 21st, 2013 at 1:14 pm #38595

Hello Jason,

good idea! I added it, I will stop by if I notice anything weird.


Posted: Friday Jan 18th, 2013 at 6:52 am #38019

Hello Jason,

That’s interesting. This has never been brought up before that I remember. I’m not aware of any issues with s2Member’s handling of this scenario. However, s2Member’s cookies are encrypted using your s2Member Security Encryption Key. So changing your Key could result in lots of issues like you’re describing.

There is actually no key in our settings. It says: “Security Encryption Key ( optional, for tighter security )”

Well if you’re suspicious there is a problem with the embedded tinyURL, try generating a Registration Access Link for yourself from the Dashboard.

I tested some of these tinyURL links already and they worked.

We actually received no complains about these two scenarios. I’m wondering if some users might run some antivirus software in their mailboxes and this software could be clicking these links and perhaps messing them up a bit. But I’m not an expert in antiviruses, so it’s just an idea.


Posted: Wednesday Jan 16th, 2013 at 11:22 am #37765

Hello Jason,

1. I checked all the 10 people which had these issues – all of them appear to be registered properly. I will double check if we registered any of them by hand.

So perhaps we can disregard these warnings, but it would be nice to know what’s going on and what that check is doing.


Posted: Wednesday Jan 16th, 2013 at 10:51 am #37752

Hello Jason,

thanks for stopping by. We are still getting these warnings.

I added some notification code into the includes/classes/ files, so I know which conditional statement fails. So next time a client complains about not being able to use the registration link, we know what happened:

1. This one fails most often:

if (($reg_cookies = c_ws_plugin__s2member_register_access::reg_cookies_ok ()) && extract ($reg_cookies) /* Needed? */)

It’s not clear what the functions in the condition do. Could you please let us know if that’s a proper check if somebody is trying to register twice, or what could it be? I can see around 5 different PayPal I-S6… keys in 20 of my notifications. So it appears the same person tries multiple times before giving up.

Is that come issue with cookies?

2. This one also failed a few times:

if (count ($register) === 6 && $register[0] === "subscr_gateway_subscr_id_custom_item_number_time" /* Does the checksum value match up here? */)

I have a var_dump kind of statement in my email notification and it reports that $register is NULL. Seems like the GET parameter in the registration link was not decoded properly. Perhaps it was messed up by tinyurl?

The ultimate goal here would be to provide better messages to clients I think. Like “Please check if you have Cookies enabled”, or “Please check if the link opened in its full length from email” – although if should, since you use tinyurl for that.


Posted: Friday Jan 11th, 2013 at 9:48 am #37004

Hello Cristián and everybody at s2,

also one simple additional question – why do these links have to expire at all? I assume the same link can’t be used for registration twice. Or is that just a precaution?


Posted: Thursday Jan 10th, 2013 at 3:32 pm #36880

Hello Cristian and everybody with expiring links,

since there is no option to buy a real gift membership for the site (but I read many threads on this forum, that it’s coming in next major release – however these are all closed), we told our customers to just buy the membership and then send the welcome email to whoever needs to get the gift.

However these links expire quite often. And it’s actually not tinyurl failing, the error message appears on the site when they click the link in email:

“Your Link Expired:
Please contact Support if you need assistance.”

If you could make sure these Gift certificates get implemented on time, it would solve two issues at once.

So – I tried to look into wp-content/plugins/s2member/includes/classes/ as that’s there the message appears. And there it is – 2 day limit on the registration URL:

apply_filters ("ws_plugin__s2member_register_link_exp_time", "2 days", get_defined_vars ())

So this is designed that way. It would be good if this would be documented in the s2Member PayPal options and button screens. There is only a mention that the “Specific Post/Page Access” links become invalid in 72 hours, but not that each registration expires like that.

It’s not true that the links don’t expire in s2Member. Or is there some strange coincidence? Here’s the gift button code if it helps – perhaps this is the only kind which expires in 72 hours?:

[s2Member-PayPal-Button level="1" ccaps="" desc="Gift membership - forward the email with registration link once you pay to your friend" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="" ta="0" tp="0" tt="D" ra="30" rp="1" rt="Y" rr="BN" rrt="" rra="1" image="default" output="button" /]

Fix – I added this into mu-plugins/s2hacks.php, there should be less complains now.

add_filter( 'ws_plugin__s2member_register_link_exp_time', 'fv_mcs_ws_plugin__s2member_register_link_exp_time' );

function fv_mcs_ws_plugin__s2member_register_link_exp_time( $time ) {
  if( $time == '2 days' ) {
    $time = '14 days';
  return $time;

I’m not sure if anybody figured this out in the past – could you please make sure that findings like this go into the s2Member plugin settings screens, so that people don’t wonder why the registration links expire.


  • This reply was modified 3 years, 12 months ago by  Foliovision. Reason: added button code
Posted: Tuesday Feb 21st, 2012 at 8:55 am #5853

Hello Jason,

we upgraded to the latest version and so no issues so far:

PHP v5.3.8 :: WordPress® v3.3.1 :: s2Member® v120213
Memory 25.23 MB :: Real Memory 25.50 MB :: Peak Memory 25.28 MB :: Real Peak Memory 25.50 MB
array (
  'payment_cycle' => 'Yearly',
  'txn_type' => 'recurring_payment_suspended_due_to_max_failed_payment',
  'last_name' => 'm......',
  'next_payment_date' => 'N/A',
  'residence_country' => 'FR',
  'initial_payment_amount' => '0.00',
  'currency_code' => 'USD',
  'time_created' => '22:26:41 Feb 10, 2011 PST',
  'verify_sign' => 'AtkaNjTO8sr7GfL6bvCsCeBLqkNzAoEfZoqR37zmNHjn1o-Zv9gT34yx',
  'period_type' => 'Regular',
  'payer_status' => 'unverified',
  'tax' => '0.00',
  'payer_email' => '',
  'first_name' => 'alessandro',
  'receiver_email' => '',
  'payer_id' => 'C3QF....',
  'product_type' => '1',
  'shipping' => '0.00',
  'amount_per_cycle' => '.....00',
  'profile_status' => 'Suspended',
  'custom' => '',
  'charset' => 'windows-1252',
  'notify_version' => '3.4',
  'amount' => '....00',
  'outstanding_balance' => '30.00',
  'recurring_payment_id' => 'I-U7...',
  'product_name' => 'Member',
  'ipn_track_id' => '6b339be4f40a3',
  's2member_log' => 
  array (
    0 => 'IPN received on: Mon Feb 20, 2012 3:47:42 pm UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal®.',
    2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
    3 => 's2Member `txn_type` identified as ( `subscr_eot|recurring_payment_expired|recurring_payment_suspended_due_to_max_failed_payment` ) - or - `recurring_payment_profile_cancel` w/ `initial_payment_status` ( `failed` ).',
    4 => 'Sleeping for 5 seconds. Waiting for a possible ( `subscr_signup|subscr_modify|recurring_payment_profile_created` ).',
    5 => 'Awake. It\'s Mon Feb 20, 2012 3:47:47 pm UTC. s2Member `txn_type` identified as ( `subscr_eot|recurring_payment_expired|recurring_payment_suspended_due_to_max_failed_payment` ) - or - `recurring_payment_profile_cancel` w/ `initial_payment_status` ( `failed` ).',
    6 => 'Member Level/Capabilities demoted to: Subscriber.',
  'subscr_gateway' => 'paypal',
  'subscr_id' => 'I-U7....',
  'period1' => '0 D',
  'period3' => '1 D',
  'item_number' => '1',
  'item_name' => 'Member',
  'ip' => '90.39.......',

I also haven’t noticed any recurring_payment_suspended_due_to_max_failed_payment where it would say that no action required, like it used to do before.


Posted: Wednesday Feb 8th, 2012 at 12:25 pm #4479

Hello Jason,

now my actual reply.

If we add EOT, will it be reset once the members pay their yearly subscription? I guess it will, since you say s2Member handles that properly.

I’m thinking of a script to add this EOT time. It would take user registration time and add 365 + few more days to it (to allow processing of 3 PayPal retires of the payment ). It would have to do it on a yearly cycle basis, since some of the users might be registered back in 2009 and still active and paying their subscription.

Do you have such script somewhere? It would help if you could provide some code snippet, otherwise I’ll have to do it. I think we have around 1,700 users like that.


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