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.

Showing EOT in template

Home Forums Community Forum Showing EOT in template

Tagged: , ,

This topic contains 6 replies, has 2 voices. Last updated by  Jean-Michel MEYER 4 years, 7 months ago.

Topic Author Topic
Posted: Monday Jun 4th, 2012 at 5:29 am #15330

Hello,
I’ve just changed my theme and copied the code

<?php if (function_exists('$s2member_auto_eot_time')){$s2member_auto_eot_time = $s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time");} ?>

to show the EOT for members but it shows 1 January 1970 for everybody . I created a test member with one year subscription and it’s the same…

List Of Topic Replies

Viewing 6 replies - 1 through 6 (of 6 total)
Author Replies
Author Replies
Posted: Tuesday Jun 5th, 2012 at 7:49 am #15481
Raam Dev
Username: Raam
Staff Member

Hi Jean-Michel,

When you edit the test member’s profile (from within the WordPress Administration), does the Automatic EOT Time field contain anything? If it’s empty, that would explain why you’re getting that date.

If the field is empty, please keep in mind that recurring Subscriptions will not generate an EOT date until the subscription expires or is cancelled (from failed payment for manually from PayPal). If you’re selling a one-time subscription, be sure to select “Buy Now” from the drop-down box when creating the button shortcode or Pro-Form shortcode.

Posted: Tuesday Jun 5th, 2012 at 8:18 am #15486

Well, it’s NOT empty :-) The test member I created had a one year subscription. EOT: Tue Jun 4, 2013 9:16 am UTC

Posted: Tuesday Jun 5th, 2012 at 9:27 am #15506
Raam Dev
Username: Raam
Staff Member

I just noticed there’s a problem with your code. Please try this instead:

if ($s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time") ) {
	echo date("F j, Y", $s2member_auto_eot_time);
}
Posted: Tuesday Jun 5th, 2012 at 10:35 am #15512

Great ! It works very nice :-) Thank you !

Posted: Wednesday Jun 6th, 2012 at 3:13 am #15647
Raam Dev
Username: Raam
Staff Member

Glad to help! :)

Posted: Wednesday Jun 6th, 2012 at 4:10 am #15666

There is still a little problem: the date is showing in english. But, well, it’s not an important problem…

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