Support

Home Forums Pre-Releases s2member addon (1.1.b) not working with latest EE3 (3.1.37.0.P)

s2member addon (1.1.b) not working with latest EE3 (3.1.37.0.P)

Posted: March 7, 2015 at 11:06 am


Workshop

March 7, 2015 at 11:06 am

Hello,

I have been using s2member addon on our site since December. Since the updgrade to EE3 3.1.37.0.P, it has not been working right, and members of with lower user roles are still permitted to register for member only events.

I realize this plugin was still in pre-release, but will there be any support for this?

Our site is: http://pscsw.org/

Thanks


Josh

  • Support Staff

March 9, 2015 at 4:38 pm

Hi Kathy,

It turns out that anything EE3 released pre-3.1.37 would have also permitted lower S2 Roles to register for Member only events. This is because earlier versions did not check for S2 Roles for member only events, same as .37. They only check for whether the user is logged in or not logged in. The s2member add-on only determines which price they get (they get members pricing if their membership meets or exceeds the S2 member level threshold). They don’t get the member pricing if their membership is below the S2 member level threshold.

If you want to make it so the member-only events check against the S2 member threshold instead of simply if they are logged in or not, this can be done with bit of template modifying. The template to be modified is in /templates/registration_page.php in the main Event Espresso 3 plugin. The line of code that can be changed is line 259.

This is the line of code:

//Check to see if the Members plugin is installed.
if ( function_exists('espresso_members_installed') && espresso_members_installed() == true && !is_user_logged_in() && ($member_only == 'Y' || $member_options['member_only_all'] == 'Y') ) {

It can be changed to this:

//Check to see if the Members plugin is installed.
if ( function_exists('espresso_members_installed') && espresso_members_installed() == true && !espresso_above_member_threshold() && ($member_only == 'Y' || $member_options['member_only_all'] == 'Y') ) {

Then, to keep this modification from being lost on the next update, you copy both your modified registration_page.php and registration_page_display.php to /wp-content/uploads/espresso/templates and it will load from there.

The support post ‘s2member addon (1.1.b) not working with latest EE3 (3.1.37.0.P)’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso