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.

How to test demotion the right way?

Home Forums Community Forum How to test demotion the right way?

Tagged: 

This topic contains 5 replies, has 3 voices. Last updated by  Raam Dev 4 years, 3 months ago.

Topic Author Topic
Posted: Friday Sep 7th, 2012 at 8:43 am #24509

Hi
I am building a membership site with S2member and want to give the member another level on demotion.
I an using this hack: http://www.s2member.com/kb/forcing-a-specific-demotion-role/

But….
I want ti test demotion for a user and the way i am doing it is edit the EOT field value for that user by adding +2min in the input field and klick save. The user is given a EOT time +2min in the “future”.
Then i wait for 5min and se what happens.

Sometimes it works and sometimes it dosent work. So…

How do i test this the best way? How do you test?
Does the user have to be logged out?
When does demotion occur? On user login?

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Saturday Sep 8th, 2012 at 6:16 am #24606

Hi Torbjörn.

Ah, the thing is that s2Member gives access an extra day.

From [hilite path]Dashboard -› s2Member® -› PayPal® Options -› Automatic EOT Behavior[/hilite]:

s2Member also calculates one extra day ( 24 hours ) into its equation, just to make sure access is not removed sooner than a Customer might expect.

I hope that helps. :)

Posted: Sunday Sep 9th, 2012 at 2:33 pm #24694

OK.
1. When i test the demotion occurs within 10-15min frpm elapsed time. Not 24h after elapsed time.
2. When i set up a S2 installation i have to be able to test the EOT and not wait 24h! That is why i ask how you test? There must be a bets practice for this…

One thing i have to mention is that the members of my installation registers for free so PayPal is not involved.
I set the EOT by using the S2 APi like so:

// Set the membership time. When the time expires the member gets role 'subscriber'
update_user_option(get_current_user_id(), 's2member_auto_eot_time', strtotime(date('Y') . 	'-12-31'));// Last day of current year
Posted: Monday Sep 10th, 2012 at 8:06 am #24739

Ah, you’re setting the EOT time yourself. The extra day is added by s2Member when the EOT is set based on a notification from the gateway. I guess that if you specify the date yourself, then as long as it’s still that day, the user will have access. And if you set it in the past, the demotion will be immediate.

Does that help?

Posted: Monday Sep 10th, 2012 at 1:08 pm #24765

OK. Can i track a s2 logfile so i se when demotion occurs? Or use some other debug tool to se what S2 does?

Posted: Tuesday Sep 11th, 2012 at 12:05 am #24837
Raam Dev
Username: Raam
Staff Member

Yes, if you enable logging (Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Logging), s2Member will report things like demotions in wp-content/plugins/s2member-logs/ and you can track what’s happening that way.

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