• How can I write a s2 shortcode that tests for EOT existence or EOT> XX days,years,whatever.
    Simple test for whether member has EOT set or not is sufficient.

    Why? I want to allow all user that have no active subscription to extend their accounts. The current implementation that if a user with active subscription buys an extension – therebey overwriting is subscription which continues to be charged but then simply disrespected by s2member is utterly strange…

    So I only want to show users with EOT or subscribers the extension form. And only users subscribers will be allowed to create an subscription – while users with EOT can only buy 1 time extensions. That’s the perfectly logical way to handle extensions – but sadly I don’t know how to do it…

    https://www.ads-software.com/plugins/s2member/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter extremecarver

    (@extremecarver)

    Can this help?:
    $s2member_auto_eot_time = get_user_field (“s2member_auto_eot_time”); # Auto EOT-Time for the current User (when applicable).

    Does this help?

    Actually, I see you took part in that discussion. But the code in Johnathon Williams’s plugin would probably help you.

    Thread Starter extremecarver

    (@extremecarver)

    I bought that plugin – but no it doesn’t help at all in this case.

    What I want is much simpler – I simply want to do
    [s2if_user_has_EOT]
    text
    [/s2if] [s2if_user_has_not_EOT AND s2_if_user_can_access_level1]
    text
    [/s2if]

    What you linked is just one of the most disastrous features of s2member – promised in “next update” 2011 already, and never ever implemented. It was asked for at least in 10 different topics in the old s2member forums by different people – and virtually all other membership plugins have got EOT notifications.

    I just want to avoid s2member crashing memberships because s2member is not meant to offer both subscriptions and fixed therm memberships. If you offer both – you clearly run into a lot of trouble – mostly because you cannot by default separate the members because no shortcode conditional exist to test for it – and 2. because s2member overwrite the subscription number. So the typical problematic case – user has subscription – then is shown fixed term extension – and pays for fixed term time extension – but subscription continues so he pays double – and after the fixed term – while still paying for subscription – his account expires. The only way to avoid this – is not to allow anyone to extend his membership UNTIL expired – clearly not a good way to do business – OR only offer subscription membership (impossible in Europe where many user don’t like subscriptions) – OR don’t offer subscription at all (loosing out lots of money probably).

    I wasn’t expecting that plugin to provide the answer just like that.

    But obviously it is able to recognize when a user has an imminent EOT, so it should give you precisely the basis not only for working out how to identify when a user has an EOT (even if not imminent) but also how to write that code.

    Thread Starter extremecarver

    (@extremecarver)

    I don’t see how that should help at all. Sorry – I just read through the source code. The only thing you can read out from this plugin is where to find the EOT time in the database. That’s not difficult to know.

    The thing is how to get that into a shortcode conditional or function.

    I don’t even need to know when the EOT is. I only need to know if the field has information or not.

    I don’t have the plugin, but surely it doesn’t identify just the location of the EOT but also whether it exists. Otherwise, how will it know to whom to send an email?

    I can build solution like [s2if_user_has_EOT] and [s2if_user_has_not_EOT], I did very similar things in my “KC s2M+MC” plugin.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Shortcode Conditionals – test if user has EOT set’ is closed to new replies.