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.

Member EOT information.

Home Forums Community Forum Member EOT information.

This topic contains 15 replies, has 3 voices. Last updated by  Kezz Bracey 4 years, 9 months ago.

Topic Author Topic
Posted: Tuesday Mar 27th, 2012 at 1:55 pm #9258
Deyson Ortiz
Username: deyson

Hello, I wanted to be able to add the date of termination for a member either on the login s2member widget or on the member profile page. I would like it to read “Your membership ends on mm/dd/yyyy” or “Uou have x number of days left in your membership.”

How could I do this?

Also, I have a few members that are members for life, for them I would like it to say “You have a lifetime membership”

Thank you :)

List Of Topic Replies

Viewing 15 replies - 1 through 15 (of 15 total)
Author Replies
Author Replies
Posted: Tuesday Mar 27th, 2012 at 4:20 pm #9285
Raam Dev
Username: Raam
Staff Member

Hi Deyson,

For recurring subscriptions, s2Member does not calculate and store the termination date for the members. That information is up to the payment gateway (e.g., if the payment fails several times after 1 month, the payment gateway notifies s2Member that the account should be terminated/demoted).

Only when s2Member receives an IPN message from the payment gateway indicating a refund, chargeback, cancellation, payment failure, or an end of term has occurred, only then will s2Member assign the EOT Time to the users account. Until then, that field remains empty.

We are working to improve this functionality in the next major release of s2Member to provide better ways of reporting membership status, payment amounts/times, etc.

Posted: Tuesday Mar 27th, 2012 at 4:23 pm #9287
Deyson Ortiz
Username: deyson

I am getting my notifications!! yeah :)

I am not using recurring membership, one payment for one year membership.

Posted: Tuesday Mar 27th, 2012 at 5:16 pm #9293
Raam Dev
Username: Raam
Staff Member

Hi Deyson,

If you’re using the Buy Now button, then the Automatic EOT Time should be set immediately after the user makes a purchase.

(When generating the Pro Form, the Buy Now and the Subscription options look very similar in the UI drop-down box. The Buy Now option is listed as “One Time ( for 1 year access, non-recurring, no trial )”; the subscription version says “One Time ( for 1 year access, non-recurring )”… notice how “no trial” is missing. You can also look at the button shortcode: if rr=”0″, that’s a Subscription button; if rr=”BN”, that’s a Buy Now button.

Take a look at the profiles of a few active members and see if the Automatic EOT time has been set. If not, then you might be using the subscription version of that button, in which case s2Member will wait until it receives an IPN message from the payment gateway.

If you are using the Buy Now version of the button and the profiles already have the Automatic EOT Time set, you’ll need to extract that time from the database before you can display it (s2Member doesn’t have an easy way of displaying that data). The EOT time is stored as a Unix timestamp, so you’ll need to convert that to a readable date before displaying it on your page/menu.

This thread from the old forum explains where you can find the Automatic EOT Time in the database and the PHP date() function is what you’ll want to use to convert the timestamp to something readable.

Posted: Wednesday Mar 28th, 2012 at 2:37 pm #9356

I’m a bit slow with this response so I’m not sure if you’re still looking, but I had the same need a while back and made a little plugin that will display EOT through a shortcode:

http://wordpress.org/extend/plugins/s2member-buttons/

You just press the little button on the toolbar that looks like a green clock.

If it doesn’t present the EOT with the wording you need the code is not too complex to modify.

Hope that helps!

Posted: Wednesday Mar 28th, 2012 at 6:28 pm #9397
Raam Dev
Username: Raam
Staff Member

Kezz,

That is fantastic! Thank you very much for sharing that with the s2Member community. :)

Awarded user ‘Kezz Bracey’ the Helpful, Experienced, and Advanced user badges.
Posted: Thursday Mar 29th, 2012 at 9:57 am #9455
Deyson Ortiz
Username: deyson

Awesome Plugin Kezz!! :)

I like the wording the way it is. The only thing I would like to add into the code is “Your membership ends”
This way the date does not appear alone, and for the lifetime subscribers it comes up blank.

How can I modify the code so it reads “‘Your membership ends” before the date?

Thank you :)

Posted: Thursday Mar 29th, 2012 at 5:52 pm #9490

You could hard code the phrase you want into the plugin by going to line 35 of the main php file and locating:

return $auto_eot_time;

Then making a new line directly above it and adding:

$auto_eot_time = "Your membership ends ".$auto_eot_time;

However, because the plugin gives you a shortcode there’s really no need as you can just type whatever you want straight into your post / page editor then place the shortcode directly after it, e.g.:

Your membership ends [eot]

That also then makes it really easy to format the text with H tags, blockquotes or whatever else you’d like to use.

That way you keep the flexibility of the shortcode, i.e. you can still place it anywhere else you might want and still have any other text you like surrounding it.

Posted: Thursday Mar 29th, 2012 at 6:34 pm #9496
Deyson Ortiz
Username: deyson

Hello Kezz and thank you.

Yes I tried putting the line inside the post, but the only problem is that for lifetime members it shows up blank after the line I wanted.

It works great! Thank you :)

Posted: Thursday Mar 29th, 2012 at 7:16 pm #9508

Happy to hear it helped. You’re welcome! :-)

Posted: Friday Mar 30th, 2012 at 9:26 am #9578
Deyson Ortiz
Username: deyson

Hello Kezz, I found out that adding the code, gave me the same result as adding it into my post.
So lifetime members see “Your membership ends” with no date.

Is there a way to detect if there is no EOT it does not show any results?

Thank you :)

Posted: Friday Mar 30th, 2012 at 6:05 pm #9609

Sure thing, this should work:

if ($auto_eot_time != “”){
$auto_eot_time = “Your membership ends “.$auto_eot_time;
}

It basically just says, if the EOT doesn’t equal ‘blank’ add the text to the beginning, otherwise just leave it as ‘blank’.

Posted: Friday Mar 30th, 2012 at 6:19 pm #9612
Deyson Ortiz
Username: deyson

Thank you Kezz, question, where should I place this code exactly? :)

Thank you :)

Posted: Friday Mar 30th, 2012 at 8:30 pm #9616

Oops, forgot to point it out.

Just replace:

$auto_eot_time = “Your membership ends “.$auto_eot_time;

Btw, copy from this actually to make sure you get proper non-curly ” marks.

if ($auto_eot_time != ""){
$auto_eot_time = "Your membership ends ".$auto_eot_time;
}
Posted: Saturday Mar 31st, 2012 at 2:33 pm #9674
Deyson Ortiz
Username: deyson

Thank you Kezz! You rock! :)

Posted: Saturday Mar 31st, 2012 at 3:34 pm #9677

You’re welcome! :-)

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