Registration Access Links expiring

We had a client purchase access to the private area of our site, but she didn’t bother to use the link right away. When she did try (a few days later) she gets a message saying that the link has expired.

Is there a setting somewhere in s2member that I can change so it doesn’t expire, or at least gives them some time?

Thank you,
Mary

What I do is I upgrade the users manually when they don’t use the link. Sometimes they don’t ever bother using the link but they want access to those areas, so I match existing free users with the information I receive from PayPal or Stripe. I also have instructions for my new users to reach out if the link doesn’t work.

2 Likes

Hi Mary,

The registration link expires in 2 days by default. Here’s a way you can try to change the link’s expiration time:

Create this directory/file /wp-content/mu-plugins/s2-hacks.php with this in it:

<?php
add_filter( 'ws_plugin__s2member_register_link_exp_time', 's2_link_exp_time' );
function s2_link_exp_time() {
   return '14 days';
}

See also: https://s2member.com/kb-article/hacking-s2member-plugin-w-hooksfilters-for-wordpress/

I hope that helps! :slight_smile:

1 Like

Thank you, I will give that a try.

I won’t really know whether it works until someone else registers, but it will come in handy.

1 Like

You can use that hack with a 1 day expiration, generate a couple test links, and then change it to the longer 14 days. Test the 1-day links in the following days, see if they expired sooner than the default, then you know your hack does change it. If you generate a 14-day one, test it after the default 2-day one would have expired. WP Admin > s2Member > PayPal Buttons > Member Registration Access Links

:slight_smile:

I think it may even work with smaller time units… Try 1 hour and 10 minutes in your tests, if it works, it’d save you days of waiting.

1 Like

Good idea, thank you!

1 Like