Re: Display account variables in theme
Posted: April 29th, 2011, 9:32 pm
You'd use 's2member_last_payment_time' instead of 's2member_auto_eot_time', and you'd change the math to figure out the days left.
— WordPress® ( Users Helping Users ) —
http://www.primothemes.com/forums/
theone wrote:That's the ticket! Thanks so much for the assistance, greatly appreciated!
For anyone who stumbles upon this thread and wants to cut to the chase.......
- Code: Select all
<?php
if ($days = get_user_option('s2member_auto_eot_time'))
{
$days = ceil(($days - time()) / 86400);
if ($days < 1)
echo 'Your subscription has expired.';
elseif ($days == 1)
echo 'Your subscription will end tomorrow!';
else
echo 'You have ', $days, ' days left.';
}
?>
- Code: Select all
<?php
if ($days = get_user_option('s2member_auto_eot_time'))
{
$days = ceil(($days - time()) / 86400);
if ($days < 1)
echo 'Your subscription has expired.';
elseif ($days == 1)
echo 'Your subscription will end tomorrow!';
else
echo 'You have ', $days, ' days left.';
}
?>