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.

Does s2Member support fixed term memberships?

Home Forums Community Forum Does s2Member support fixed term memberships?

This topic contains 5 replies, has 2 voices. Last updated by  Raam Dev 4 years, 7 months ago.

Topic Author Topic
Posted: Tuesday May 15th, 2012 at 11:18 pm #13600

Can I create fixed term memberships with s2Member (Free/Pro), i.e. I want all memberships to expire on a specific day. If you subscribe during the year, your membership should be set to expire on that day. It would be really nifty if there was a rollover period as well.

Example:

End of financial year is 30th June, so all memberships should expire on that day.

Let’s take 2012 as an example: anyone who joins after 1st July 2012, should be a member until 30th June 2013. However, if they join after 1st April 2013, they should be a member until 30th June 2014 (i.e. there is a 3 month roll over period). If they join on the 30th March 2012, they are only a member until 30th June 2012.

We’re looking for a membership system for our incorporated association, so we can’t legally support rolling memberships because we need to know exactly who is entitled to vote at the AGM/SGM at any time.

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Wednesday May 16th, 2012 at 3:59 am #13634
Raam Dev
Username: Raam
Staff Member

Hi Avi,

This is certainly possible but it would require a little custom PHP programming to determine the current date and then set the properties of the signup form accordingly.

So, if on a specific date (or between two specific dates) you wanted to offer 3 months free followed by a paid membership for 1 year, you could do that using the Free/Trial period on the Pro-Form shortcode (s2Member Pro is required for Pro-Forms).

We don’t support the custom programming, so you’d need to hire a programmer to do that part. It wouldn’t be too much work as it’s really just manipulating the s2Member shortcode based upon various rules related to the current date.

Posted: Wednesday May 16th, 2012 at 6:52 pm #13703

Raam,

Are you able to point me towards the hook/filter that is most appropriate or called before the shortcode to generate the button is called? I’ve been looking through the Codex, but without doing a proper review of all the hooks/filters, it’ll take me a while to find the right one. I might as well ask here, in case you’ve done something similar in the past. :)

Cheers,
Avi

Posted: Thursday May 17th, 2012 at 3:55 am #13738
Raam Dev
Username: Raam
Staff Member

Hi Avi,

There are no hook/filters necessary for this. You can use Dynamic Shortcode Attributes with the s2Member Pro-Forms (available with s2Member Pro). You’d simply use some PHP to calculate the trial amount (aka, the free period until their subscription should start) and then configure the Pro-Form shortcode appropriately. When s2Member displays the signup form to your visitor, it will already be configured with the correct attributes.

You can read more about Dynamic Shortcode Attributes here.

Posted: Tuesday May 22nd, 2012 at 3:35 am #14170

Raam –

I actually did this by hooking into the ws_plugin__s2member_pro_before_sc_paypal_form_after_shortcode_atts action to modify the attributes of the shortcode prior to it being displayed. This way, I don’t need a PHP Execution plugin, which makes me feel better from a security perspective. :)

Essentially, the system calculates the number of days between time(), i.e. now, and the 30 June and then sets that as the rp (period) in days for the Buy Now, non-recurring, non-trial subscription.

Thanks for the pointers!

Posted: Tuesday May 22nd, 2012 at 11:57 pm #14256
Raam Dev
Username: Raam
Staff Member

Thank you for the update, Avi! :)

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