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.

$s2member_auto_eot_time not working anymore

Home Forums Community Forum $s2member_auto_eot_time not working anymore

This topic contains 1 reply, has 1 voice. Last updated by  John Larsen 3 years, 1 month ago.

Topic Author Topic
Posted: Thursday Dec 5th, 2013 at 4:47 pm #61627
John Larsen
Username: smmrlnd

Hi, I created some PHP on my membership page to display a member’s expiration date. It has suddenly stopped working and I think it has to do with WordPress auto-correct

Note: I’m utilizing the Insert PHP plugin to allow the PHP code to work on the page. Other PHP I’ve tested is fine but not these specific S2 Member variables.

This is the code that I’m utilizing:

[insert_php]
$s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time");
$eotdate = new DateTime("@$s2member_auto_eot_time");
echo $eotdate->format('d-M-Y');
[/insert_php]

It was working but I updated the page and I think it is related to the “echo” statement being “fixed” by WordPress. I’m not a great PHP coder and I feel this is obvious, but I haven’t found the answer yet.

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Thursday Dec 5th, 2013 at 5:03 pm #61638
John Larsen
Username: smmrlnd

Answered my own question. Sorry to bug you. WordPress is correcting the following:

echo $eotdate->format('d-M-Y');

And turning it into:

echo $eotdate->format('d-M-Y');

Just edited in non-visual mode and it is working again.

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