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.

Understanding what is, and what isn't EOT

Home Forums Community Forum Understanding what is, and what isn't EOT

Tagged: ,

This topic contains 9 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 7 months ago.

Topic Author Topic
Posted: Wednesday May 23rd, 2012 at 3:35 pm #14358

Hi S2Member,

OK, so I have 1 type of membership that’s supposed to go on and on and renew itself every month. And I have another one that’s supposed to work for 24 hours and then self-destruct.

Following the helpful advice on here, I found the PayPal option to change default EOT behavior to “delete.”

My question is: Will this EOT behavior get triggered by normal monthly renewals? It doesn’t, right? I’m trying to make it so that my 24-hour plan self-destructs and will never renew, but the other one renews and rebills.

Any help much appreciated,

-John

List Of Topic Replies

Viewing 9 replies - 1 through 9 (of 9 total)
Author Replies
Author Replies
Posted: Thursday May 24th, 2012 at 4:50 am #14436
Raam Dev
Username: Raam
Staff Member

Hi John,

What happens will depend on what button/form was used to create the account. If a user signs up using a Pro-Form that’s configured to offer 24 hours of access, then after 24 hours the user’s account will be deleted.

If the user signs up using a Pro-Form that was created to offer a recurring monthly subscription, then the users account will only be deleted if s2Member receives an EOT notification from PayPal (which can occur for things like several failed payments, user-canceled subscription, etc.). If s2Member doesn’t receive an EOT notification from PayPal, the users account will not be deleted. The user will simply be rebilled each month for the subscription and will continue to have access.

Posted: Thursday May 24th, 2012 at 2:28 pm #14498

Okay, thanks for this. So do you mean that this strictly happens under Pro Forms, as opposed to regular PayPal buttons?

Because when I tried this with a regular PayPal button for a 24-hour pass, the EOT didn’t seem to happen, or the user didn’t seem to get deleted the way I wanted.

I’m gonna try again with a Pro Form. Can you tell me if I’m doing this wrong? Here’s the shortcode:

[s2Member-Pro-PayPal-Form level="5" ccaps="" desc="24-hour pass / Description and pricing details here." ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="peterbcollins.com" ta="0" tp="0" tt="D" ra="0.01" rp="1" rt="M" rr="1" rrt="" rra="2" accept="paypal,visa,mastercard,amex,discover,maestro,solo" accept_via_paypal="paypal" coupon="" accept_coupons="0" default_country_code="" captcha="0" /]

Any help much appreciated,

John

Posted: Friday May 25th, 2012 at 8:01 am #14571
Raam Dev
Username: Raam
Staff Member

The rt=”M” doesn’t look right in your shortcode, as the rt= attribute means Regular Term = Months (please see Dashboard -› s2Member® -› PayPal® Pro Forms -› Shortcode Attributes (Explained) for details on the attributes).

If you want to do a 24-hour one-time access pass, then you should select One Time ( for 1 day access, non-recurring ) and then generate your shortcode. That will create a Pro-Form that provides 1 day of access.

The PayPal Buttons should work the same way and you’d select the same One Time access option. Just make sure you press Generate Button Code after making your changes and then copy/paste the shortcode onto your page.

Posted: Friday May 25th, 2012 at 10:27 am #14601

Agh, no, apologies, but I’ve been trying to get the right answer on this for weeks, and going in circles, but I should have added:

I don’t think I can use

One Time

because it doesn’t create a WordPress user account but rather creates some sort of URL scheme based on Content Restriction, right? Doesn’t work for my setup, and I’ll explain why.

See, I was going to use Content Restriction and the typical one-shot access. But then I found out on this board that it wouldn’t work for me. That’s because I needed to use Partial Protection. We break up posts into segments, shortcoded public and private.

So our scheme is based on using S2Member to manage regular WordPress accounts, and the idea is that if you’re logged in, you can see the stuff. If you aren’t logged in, you can’t.

So what I need is a button that creates a regular WordPress account for a buck. That WP account should self-destruct in one day. Maybe I should just be using some cron-tab thing instead of trying to figure this out?

Maybe I can make it work by adjusting the shortcodes? Can I make the shortcodes do what I need?

  • This reply was modified 4 years, 7 months ago by  Johnny Novato.
  • This reply was modified 4 years, 7 months ago by  Johnny Novato.
Posted: Friday May 25th, 2012 at 3:31 pm #14627

Edited my question because I wrote it while sleepy. Hoping someone can help me figure out what the best shortcode is for this. Bear with me, I just can’t do it using the other methods. :( Could this be the magic recipe?

[s2Member-PayPal-Button level="5" ccaps="" desc="24-hour pass / Your one-day ticket to PBC." ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="peterbcollins.com" ta="0" tp="0" tt="D" ra="1" rp="1" rt="D" rr="0" rrt="" rra="1" image="default" output="button" /]
  • This reply was modified 4 years, 7 months ago by  Johnny Novato.
Posted: Friday May 25th, 2012 at 11:18 pm #14653

Hi Johnny.

Have you watched these videos?

The Specific Post/Page access one may help with the 1 day access you want to sell, since you’re planning to delete the account, it’s probably just as well that he doesn’t even have to create it. With Spec Post restriction/button you can sell a page for a single day, accessible via the link s2Member sends the client via email.

For the regular monthly payments you can use a normal Level 1 button and have the EOT behavior set to demote instead of delete the account.

I hope that helps.

Posted: Tuesday May 29th, 2012 at 12:10 pm #14877

Hi Christian:

Thanks, and I appreciate that, but here’s where Specific Post/Page Access won’t work for our situation, unless I am mistaken. Bear with me here, please.

1. Specific Post/Page Access relies on Content Permissions, right? Doesn’t it require that the post be Protected under the Content Permissions system?

We found that Content Permissions blocked out posts totally from public view, excerpts and all. We needed to provide content that was partially exposed to public view, and then partially blocked. So that’s why we based our system on WordPress shortcodes that censor or redact posts based on whether the user is logged in.

2. Will Specific Post Page/Access

a) simulate the state of being logged in? And thus present the hidden content protected within shortcodes designed to discriminate against users who are not logged into WordPress? (THIS WOULD WORK FOR US.)

b) Or will it merely present raw pages that still have our shortcodes in them, blocking the content from view despite the purchase? (THIS WOULD NOT WORK FOR US.)

Do you see what I am saying, and why I have tried to implement the idea of the expiring 24-hour user, rather than the one-shot URL purchase? The one-shot URL purchase seems like it would be incompatible with our “are you logged in”-based, legacy content protection scheme.

That’s why the idea of the expiring 24-hour WordPress account seems like a worthwhile goal. This user could be told after 24 hours that his access had run out, and might even be persuaded to sign up for the monthly plan.

If we can’t make this work through S2Member it seems like I am going to have to write a crontab solution… :(

Thanks for your attention and I hope you understand what I am trying to explain here…

Posted: Tuesday May 29th, 2012 at 8:47 pm #14888

Hi, future Googlers of this subject:

I have gotten around the problem by writing, in MySQL, a kind of user-killing drone for use in the crontab. It searches for users more than 24 hours old and then bounces them, along the following lines:

$querystr ="SELECT *
FROM wp_usermeta
LEFT JOIN wp_users ON wp_users.ID = user_id
WHERE wp_usermeta.meta_value LIKE  '%s2member_level5%'
AND wp_users.user_registered < NOW( ) - INTERVAL 24 HOUR 
LIMIT 0 , 30";

	$watchlist = array();
	
	$result = mysql_query($querystr);
	
	while ($row = mysql_fetch_assoc($result)) {
		$deadbeat = $row['user_id'];
		echo $deadbeat;
		
		$purgeStr = "DELETE from wp_users WHERE ID = " . $deadbeat;
		$purgeAction = mysql_query($purgeStr);
	
		if (!$purgeAction) {
			die ('Cannot purge because ' . mysql_error());
		}
		else {
			echo $purgeAction;
		}
	};
Posted: Thursday May 31st, 2012 at 3:03 am #14999

Yeah, I understand better what you wanted now. Thanks for explaining it, and I’m glad you found a way to make it work like that. :)

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