This topic contains 9 replies, has 2 voices. Last updated by Cristián Lávaque 3 years, 8 months ago.
Topic Author | Topic |
---|---|
Posted: Thursday Apr 11th, 2013 at 3:58 pm #47223 | |
Hi, I want to change the user role upon EOT end to s2member_level1. I found this article in your forum http://www.s2member.com/forums/topic/changing-the-eot-demotion-level-dynamically/ but it doesn’t seem to work for me. I created an exact copy of s2member/includes/classes/auto-eots.inc.php, put it in mu-plugins and renamed it wp-content/mu-plugins/s2hacks_auto_eots_override.php Then I deleted
to
But it doesn’t work for me. It just stays at the initial user level set for the user. When I var_dump the
I still get the initial user level. In the wp backend user settings it is of course also the same. I tried to use just one user level in the if statement instead of to with the or (||), there it works. But if I try to combine both user levels, either with an elseif statement or just two simple if statements after each other, only one gets the correct user level, the second stays with the initial one. So I guess my main question is, how can I combine both user levels in the if statement. Do you have any idea where the problem might be? And another problem I found is, that the date timestamp of the registration is saved after UTC 0 and the EOT time is calculated accordingly to that value. But here in Germany we have +2 hours (normally just +1hour, but now in the summertime timezone its +2). When I look in the user overview of the wp backend, the registration time is shown correctly like the registration time was here in Germany at that moment. But I guess the EOT time doesn’t take this into account, so in total the registered user looses, in that case 2 hours of his payed for time. I’m basing my assumption on the timestamp saved in core_s2member_auto_eot_time. Or is there a function in your plugin that takes this into account and gives the user the correct EOT time? I stumbled upon this problem while writing a function that shows the user how much time he has left until his subscription is running out. I would appreciate if you could clarify this issue for me. Thank you very much for your efforts! Best regards from Berlin |