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.

Renewals help needed

Home Forums Community Forum Renewals help needed

Tagged: ,

This topic contains 11 replies, has 4 voices. Last updated by  Eduan 3 years, 10 months ago.

Topic Author Topic
Posted: Tuesday Feb 26th, 2013 at 4:45 am #43205

Hi guys,

I’m in urgent need of some help in regards to membership renewals. The site running S2Member opened a year ago this weekend and my client has just out it on me that we need to have the following:

A) Renewal Emails sent out to members who are about to expire or have expired.
B) Have a message on login showing the user how many days they have left until their account expires.
C) Once an account has expired put a warning message up showing the account has expired and that the user should renew

I have already seen both of these links: http://www.s2member.com/forums/topic/renewing-membership/ & http://www.s2member.com/forums/topic/automatic-renewal-reminder/ but the issue is I’m primarily a designer and know nothing on the way API’s work, how to extract data or code them. Also the plugin mentioned in the second link doesn’t mention any hooks to use or where to save it and under what name.

Please treat me like a novice, I will probably understand some of the stuff said to me but let’s try to keep it as simple as possible. Any help would be greatly appreciated and this is a very time-sensitive situation.

Thanks for your time and I look forward to any replies :)

List Of Topic Replies

Viewing 11 replies - 1 through 11 (of 11 total)
Author Replies
Author Replies
Posted: Tuesday Feb 26th, 2013 at 5:00 am #43207

Forgot to mention that I’m currently running Version: 111220

Posted: Tuesday Feb 26th, 2013 at 9:51 am #43237
Chelle
Username: chelle165

I am glad to see someone wrote a plugin to add this feature, but would like to see it built into s2member itself…I have been using s2member for three years now and I often get a lot of people who have requested I send email notification when they are due to renew – I think it would also help reduce the amount of PayPal disputes I get.

To use the plugin halifaxious wrote, this link will help you implement it on your site:
https://codex.wordpress.org/Writing_a_Plugin

Posted: Tuesday Feb 26th, 2013 at 1:24 pm #43253

Thanks for the reply but I’m still stuck :( I have been researching some more and according to these forums the next “major” update to the plugin will have renewals but this has been said multiple times in the last year so when is this update due? My client is getting pretty annoyed about this as a membership plugin without a renewal system is pretty redundant!

Posted: Wednesday Feb 27th, 2013 at 8:50 am #43310

Hi Dave.

About using halifaxious’ hack, this article may help: Knowledge Base » Hacking s2Member® Via Hooks/Filters

Bruce also wrote a hack to notify of a coming expiration, which I see you found already. http://www.s2member.com/forums/topic/setting-up-eot-notifications/

Dave, Chelle, we agree that s2Member would be better having these notifications out of the box. We are working on having them in the new s2Member, but I don’t have a release date yet. It’s a complete rewrite of the plugin, with tons of new features, and has been taking longer than we expected.

B) Have a message on login showing the user how many days they have left until their account expires.

Are you selling subscriptions or are renewals done manually with buy-now payments? The subscriptions don’t set an EOT time before ending, but buy-now ones set the EOT immediately.

If you have an EOT time in the user’s profile, you can use it in a conditional to check the time left and display a message in the Login Welcome Page reminding them.

[hilite path]Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals[/hilite]
http://www.s2member.com/codex/stable/s2member/api_functions/package-functions/#src_doc_get_user_field%28%29

[hilite pre_code]
$s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time"); # Auto EOT-Time for the current User (when applicable).
[/hilite]

Or you can use the time the user purchased to figure out when the access would be expiring, and display the message based on that. [hilite path]Dashboard -› s2Member® -› API / Scripting -› Content Dripping[/hilite]

C) Once an account has expired put a warning message up showing the account has expired and that the user should renew

If you have the Auto EOT Behavior set to demotion, then you can check if the user is at Level 0 to display the renewal message in the Login Welcome Page. [hilite path]Dashboard -› s2Member® -› API / Scripting -› Simple/Shortcode Conditionals[/hilite]

[hilite pre_code]
[[s2If current_user_is(s2member_level0)]
Some content for Free Subscribers.
[/s2If]]
[/hilite]
I hope that helps. :)

Posted: Wednesday Feb 27th, 2013 at 9:52 am #43322

Thanks for the reply… In regard to the solution to output the users expiry date I used this code:

<?php echo $s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time"); ?>

However the output on the site just shows a string of numbers, how can I get it to display the date?

Posted: Wednesday Feb 27th, 2013 at 12:57 pm #43340

I’ve solved the notification now by using this code:

<?php if ($s2member_auto_eot_time = get_user_field ("s2member_auto_eot_time") ) {
	echo (' your membership is due to expire on: ');
	echo date("l jS F, Y. ", $s2member_auto_eot_time);
	echo ('Would you like to <strong><a href="#">renew it now</a></strong>?&nbsp;&nbsp;');	
} ?>

If anyone knows how to clean it up better then that’d be awesome!

Posted: Thursday Feb 28th, 2013 at 5:58 am #43391

I’ve solved the notification now by using this code:

Cool. :)

If anyone knows how to clean it up better then that’d be awesome!

Something like this?

[hilite pre_code]
renew it now?  ';
?>
[/hilite]
Posted: Thursday Feb 28th, 2013 at 8:28 am #43404

Thanks Cristián :)

Posted: Thursday Feb 28th, 2013 at 8:37 am #43405

No problem. :)

Posted: Thursday Feb 28th, 2013 at 1:01 pm #43427

Is there anyway I can adapt that code so if a free user logs in they see “You’re currently a free subscriber, please click here to upgrade”?

Posted: Friday Mar 1st, 2013 at 12:07 pm #43508
Eduan
Username: Eduan
Moderator

Hello Dave,

That is very possible (and simple too). :)

You would simply use s2Member conditionals on your login welcome page. You would check if the user is a level 0 user, if he is then tell him to upgrade.

Check this article for more info on conditionals: Knowledge Base » s2Member® Conditionals

– Eduan

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