Notifications
Clear all

memberpress

10 Posts
6 Users
0 Likes
2,088 Views
Pikapower
Posts: 25
Topic starter
(@pikapower)
Eminent Member
Joined: 3 years ago

Does wpforo works together with memberpress ?

9 Replies
Robert
Posts: 9715
Admin
(@robert)
Support Team
Joined: 7 years ago

Hi @pikapower,

We're currently working on this. It'll available in near future releases.

Reply
1 Reply
RichardHKG
(@richardhkg)
Joined: 3 years ago

Eminent Member
Posts: 23

@robert Any timeline on MemberPress integration? Been nearly 4 months since yoru message and hoping to see it very soon.

I can make a start now on a public Q&A Support forum but need to know I can expand to protected Members-only forums in the 'near future'.

Thanks. You have a wonderful product.

Reply
3d0g
Posts: 4
 3d0g
(@3d0g)
New Member
Joined: 4 years ago

I've been working with Memberpress / wpForo integration all year. Even though the Memberpress role synchronization add-on only updates WP secondary roles, it kinda worked as wpForo catches the add_user_role action. As long as one doesn't manually re-synchronize the wpForo usergroups, member usergroup access does get updated on signup.

Where the wheels eventually fell off was on membership role expirations. Memberpress processes these through a wp cron job and A: it's buggy as hell, plus B: wpForo doesn't notice the role removals. I've got a LOT of membership expirations coming up over the next couple months so I had to get something working. I ended up scrapping the user role synchronization in both Memberpress and wpForo and added an action hook that monitors all Memberpress membership events. If you're comfortable in PHP (and editing your functions.php file), this should give you some ideas...

//Note expiration events run 24 hours behind. Pretty sure it's a Memberpress bug...
add_action('mepr-event-create', 'listen_to_mepr_events');
function listen_to_mepr_events($event) {
$obj = $event->get_data();

if(!($obj instanceof MeprTransaction) && !($obj instanceof MeprSubscription)) {
return; // nothing to do here if we're not dealing with a txn or sub
}

$member = $obj->user();

if($member->is_active_on_membership($obj)) { //active membership

if(674 == $obj->product_id) { //guest trial
WPF()->member->set_usergroup( $member->ID, "3" );
}
else { //all paid members
WPF()->member->set_usergroup( $member->ID, "5" );
}
}
else { //inactive membership
WPF()->member->set_usergroup( $member->ID, "11" );
}
}
Reply
5 Replies
studio500
(@studio500)
Joined: 5 years ago

Estimable Member
Posts: 85

@3d0g Thanks for your valuable insight to Memberpress in conjunction with wpforo. I had recently purchased Memberpress but now I'm having to rethink my approach.

If only Gvectors would produce a simple paid membership premium addon, it would save so many issues.

I noticed you posted your above php in Decemeber, how has it been working out for you since then?

Reply
3d0g
 3d0g
(@3d0g)
Joined: 4 years ago

New Member
Posts: 4

@studio500 Yes, the above code has worked flawlessly for us. The only quirk, as I mentioned, is Forum privileges expire a day later than the Memberpress subscription does. We've got about 200 folk between active members, trial subs, and expired accounts, with 90% of the renewals happening at the beginning of the year, and everyone processed correctly.

If I had a do-over, I'd probably re-think the Memberpress choice. I've spent too much time in their code over the year and it's bad. Logically sloppy, inconsistent coding styles between developers, and we hit quite a few bugs support had to patch for us. I can't think of any product I've needed more support on in my 35 years in IT.

We also tried S2 but it did not play nice at all with our theme or BoldGrid. Not sure what I'd recommend for memberships at this point. For a forum focused site, yeah a wpForo-based membership solution would be nice but for us, the forum is just one facet of membership privileges so that wouldn't work. 

I know WP secondary role synchronization is on the radar for wpForo. For Memberpress users at least, that would help greatly with managing forum permissions. I still like my solution though as I can now do things with wpForo permissions beyond user roles, like giving cash payment members trial privileges while waiting for their check to arrive, etc.

Reply
RichardHKG
(@richardhkg)
Joined: 3 years ago

Eminent Member
Posts: 23

@3d0g Hi. Is the "MemberPress role synchronization add-on" you talk about the MemberPress "WordPress User Roles" add-on within MemberPress?

If yes, does that mean I can restrict wpForo forum access to MPress members only? Just by adding appropriate role to Memberships? As all Memberships I use are lifetime I will not run into the subscription trouble you have created the above code for, right?

Thanks for your time. I asked yesterday about when wpForo integration is coming expecting it to be a wpForo update as suggested by admin earlier. Hence my confusion, and possibly why no reply. ; )

Reply
3d0g
 3d0g
(@3d0g)
Joined: 4 years ago

New Member
Posts: 4

@richardhkg Unless something has changed dramatically in wpForo since last fall, yes, what you're wanting to do should work if you install the free User Role add-on for Memberpress. That add-on uses the Wordpress add_user_role action, which wpForo hooks into for its user role synchronization. The compatibility issue happens only on membership expirations as MemberPress uses secondary roles and wpForo just tracks the primary user role.

Alternately, the code I posted above would work fine for you as well. Just tweak the logic and wpForo usergroup numbers to your setup and no role synchronization is required from either plugin.

Reply
RichardHKG
(@richardhkg)
Joined: 3 years ago

Eminent Member
Posts: 23

@3d0g Brilliant. Thanks for your confirmation. Yes, I will try your code first which would be the lightest and most efficient solution. Who knows what bloat is in the MP plugin? ๐Ÿ˜‰

Reply
Dude
Posts: 16
 Dude
(@dude)
Eminent Member
Joined: 9 months ago

@3d0g thank you for your help.

I'm using Memberpress and while it assigns an additional role to a new paying user, WPforo only recognizes the initial role and not the new one.

I want to allow unpaid members to access some parts of the forum on a read-only basis.

Instead of using roles, I could restrict the entire forum and only allow paying members to access it, but I want to avoid that.

ย 

Any ideas how to get that? Shouldn't WPforo recognize dual roles?

Thank you

Reply
Share: