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.

Urgent: EOT not correct.

Home Forums Community Forum Urgent: EOT not correct.

This topic contains 18 replies, has 3 voices. Last updated by  Eduan 3 years, 10 months ago.

Topic Author Topic
Posted: Monday Feb 18th, 2013 at 8:00 am #42245
Ronnie
Username: Zeeflo

Hello.

This is our template for our Level2 access (1 day non-recurring, buy now pro-form)

[s2Member-Pro-PayPal-Form level="2" ccaps="" desc="Uden abonnement / 20,- for 24 timer" ps="STYLE" lc="" cc="DKK" dg="0" ns="1" custom="www.DOMAIN.dk" ta="0" tp="0" tt="D" ra="20" rp="1" rt="D" rr="BN" rrt="" rra="2" accept="paypal" accept_via_paypal="paypal,visa,mastercard,amex,discover,maestro" coupon="" accept_coupons="1" default_country_code="DK" captcha="0" /]

Today, a customer signed up at

    MON 1:29 pm UTC

, but her EOT is in 48 hours,

    Wed Feb 20, 2013 12:29 pm UTC

Am I missing something here?

Please respond quickly before more customers sign up for 1 day access.

List Of Topic Replies

Viewing 18 replies - 1 through 18 (of 18 total)
Author Replies
Author Replies
Posted: Monday Feb 18th, 2013 at 10:16 am #42266
Eduan
Username: Eduan
Moderator

Hello Ronnie,

Perhaps this is because of the behavior for EOT, in which s2Member gives the user 24 extra hours added to the EOT you give him.

This is all explained under Dashboard -› s2Member® -› PayPal® Options -› Automatic EOT Behavior and you might be able to configure some (I believe not this one) of this behavior under Dashboard -› s2Member® -› PayPal® Options -› Automatic EOT Behavior as well. :)

– Eduan

Posted: Monday Feb 18th, 2013 at 10:18 am #42267
Ronnie
Username: Zeeflo

I was suspecting this.
How do I stop this behavior, it cannot be found in the Paypal AUTO EOT behavior..!?

If I define 1 day, I want to give my clients 1 day.. Not 2!

Posted: Monday Feb 18th, 2013 at 11:50 am #42280
Eduan
Username: Eduan
Moderator

I’m not sure how you would stop this.

I will ask Jason for his advice. :)

Posted: Monday Feb 18th, 2013 at 12:02 pm #42285
Ronnie
Username: Zeeflo

Looking forward to it :)

Posted: Monday Feb 18th, 2013 at 1:55 pm #42306
Ronnie
Username: Zeeflo

@ Jason and @ Eduan

Were getting more and more members buying our 1 day membership, but getting 48 hours. Please assist as soon as you can!

Posted: Monday Feb 18th, 2013 at 3:30 pm #42322
Eduan
Username: Eduan
Moderator

Jason answered to this and accepted it as a feature request. :)
However I’m not sure when this will be possible.

For now please bear with it or remove the 1 day feature until it’s available. :)

– Eduan

Posted: Monday Feb 18th, 2013 at 8:07 pm #42376
Staff Member
Accepted as a feature request. Thank you!
Posted: Tuesday Feb 19th, 2013 at 3:26 am #42448
Ronnie
Username: Zeeflo

Although I appriciate S2member, I really really dont appriciate this answer

“Bear with it or lose the 1 day feature”… What youre telling me, is that we should drop our most popular product..

I would have been happy with an answer such as, “Were gonna change this in the next release, can you untill then edit the EOT manually” or even “We suggest that you hack it with S2Hacks and set the EOT to +24 hours”.. Anything but a rude “this is how it is, deal with it or remove it” when its a feature I and ANYone else would suspect to work..

Why on earth would someone give out 1 day for free if he has the option to only sell 1 day access?
Why would you even code it to auto behave like that.. The option should atleast be there “Do you want to be a serious business or do you want to give away stuff for free?”

Im looking forward to see this changed in the next update!!!

Sorry if that was a bit rude or anything.. And I assume Eduan didnt mean anything mean by his comment – but telling me to live with it untill we decide to do something, OR remove your most favorite produce… Thats not gonna cut it!!

Posted: Tuesday Feb 19th, 2013 at 4:01 am #42451
Staff Member

Thanks for your patience.

We will be introducing a filter for this (at the very least) in the next maintenance release. I’m attaching a PATCH file for you in the mean time; in case you’d like to jump the gun a bit. Please unzip and upload the attached file, allowing it to override your existing copy of /s2member/includes/classes/utils-time.inc.php

PATCH: http://d1v41qemfjie0l.cloudfront.net/s2member/uploads/utils-time.inc_.php_.zip

Then follow these instructions to apply the Filter you desire.

Please create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
(NOTE: these are MUST USE plugins, see: http://codex.wordpress.org/Must_Use_Plugins)
(See also: http://www.s2member.com/kb/hacking-s2member/)

Regarding Eduan’s response earlier. I’m sorry about that Ronnie. I don’t think he meant to come off as being rude; but I can see why you might have that impression. I will notify Eduan about this. He’s a good guy.

Why on earth would someone give out 1 day for free if he has the option to only sell 1 day access?
Why would you even code it to auto behave like that.. The option should atleast be there “Do you want to be a serious business or do you want to give away stuff for free?”

This is meant as a grace period, because often times a customer does NOT understand how these times work; particularly when they are in a different time zone. So while it might be something that you’re not thrilled about (and I can understand that); this is an edge case. Most site owners will agree that a grace period is ideal in most scenarios; because a customer being upset they lost access too soon, is usually not desirable. Even if it’s handled perfectly (i.e. right on time); anything too soon, from a customer’s perspective, will result in negativity.

One extra day in the case of a 1 day access though, I can see where that would become an issue. I will see what we can do about this in the next release; even beyond the filter I’m preparing here for you.

Posted: Tuesday Feb 19th, 2013 at 4:07 am #42454
Ronnie
Username: Zeeflo

@ Jason, yes he is. He has always been very helpfull, even before he became a volunteer moderator, which is probably why i got even more frustrated with his answer :)

I will try this one out and notify you when another customer buys this product :)

Posted: Tuesday Feb 19th, 2013 at 4:12 am #42456
Staff Member

Thanks Ronnie!

Posted: Tuesday Feb 19th, 2013 at 4:36 am #42459
Ronnie
Username: Zeeflo

@ Jason

Can you please confirm that my s2-hacks.php looks correct:

<?php
add_action('init', 's2_payment_notification_handler');
function s2_payment_notification_handler()
	{
		if(!empty($_GET['s2_payment_notification']) & !empty($_GET['user_id']) && !empty($_GET['item_number']))
			{
				if(preg_match('/\:3 D$/', $_GET['item_number']))
					update_user_option((integer)$_GET['user_id'], 's2member_auto_eot_time', strtotime('+14 hours'));
				exit;
			}
	}
add_filter('ws_plugin__s2member_add_meta_boxes_excluded_types', 's2_meta_box_exluded_post_types');
function s2_meta_box_exluded_post_types($what_s2_says)
	{
		if(!is_super_admin())
			return array_keys (get_post_types ()); // Block in all Post Types.
			
		return $what_s2_says;
	}
add_filter('ws_plugin__s2member_eot_grace_time', '__return_false');
Posted: Tuesday Feb 19th, 2013 at 5:09 am #42465
Staff Member

Looks good Ronnie.

In this part of your code.
strtotime('+14 hours') — keep in mind that is UTC time; it’s NOT your local time.

Posted: Tuesday Feb 19th, 2013 at 5:11 am #42466
Ronnie
Username: Zeeflo

Yes, this is causing me some headache.. I cant figure out what this has on impact for our customers..

I mean, we are UTC+1 … Ive noticed that when a client signs up, he gets 2 hours less then our current time, which is why I added the two extra hours, just to be sure he/she gets all his 12 hours.

Posted: Tuesday Feb 19th, 2013 at 5:22 am #42467
Staff Member

WordPress® operates on UTC time, because the WordPress® framework forces PHP to a UTC timezone when it initializes. So while you can configure your local time zone for WordPress; that only affects the way dates/times are expressed on-site. It does not affect the way dates/times are actually calculated in most of WordPress.

s2Member’s EOT Times are always based on UTC time. So you are correct to have UTC time in this customization. It’s just important to realize what this really means. It means that every customer will have 14 hours of access. It starts from the UTC time they pay you; and it ends 14 hours later (which is good).

Just keep this in mind when EOTs occur, they occur at UTC time; and it can be somewhat confusing if you’re ahead or behind that time; as most people are. Here is an example to indicate how this works.

Customer pays at: 12:00 am UTC time (1:00 am your time).
Customer’s EOT Time is set to: 2:00 pm UTC time (3:00 pm your time).

The timezone of the customer is not relevant here. Not really.

Posted: Tuesday Feb 19th, 2013 at 5:24 am #42469
Ronnie
Username: Zeeflo

Aha ok. So basically what youre saying, is that its best to operate on UTC time, cause it disregards what timezone youre in. You get X hours, from when you buy to the period ends, no matter where you are.

Guess Ill be changing it back to 12 :)

Thanks :)

Posted: Tuesday Feb 19th, 2013 at 5:38 am #42470
Staff Member

Very welcome!

Posted: Tuesday Feb 19th, 2013 at 11:45 am #42488
Eduan
Username: Eduan
Moderator

I read this now. :)
I’m sorry if I came off as rude, it wasn’t my intention. I now realize “live with it” can come off as “deal with it, not my problem”, and that is quite rude. I assure you, these were not my intentions. :)

Thanks for handling this Jason, learned some new stuff. :)

Also, Ronnie, the ability to edit this extra 24 hours to your own custom amount is already being worked on for the next release of s2Member. :)

– Eduan

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