WordPress and wishlist member


(Lea-Ann McGregor) #1

I am looking for a forum for a community website running WordPress, wishlist member, and wp courseware. According to wishlist member, WishList Member uses the WordPress database to create members so no extra member account is needed for logging into forums that also use the WordPress user database.

Would Discourse with the wp plugin be suitable for this install?


Wordpress Users Synchronization → Automated and Secured
(Simon Cossar) #2

Yes, it could work very well. If you would like to restrict access to the forum based on what course a user has signed up for on your WordPress site, it will require some custom code. I’m interested in integrating the WP Discourse plugin with this kind of thing, so I could help out if you decide to do it.


(Lea-Ann McGregor) #3

Excellent! In wishlist member, there are “levels.” Courses in wp courseware can be assigned to multiple levels. Let me know the correct process for proceeding.


(Simon Cossar) #4

It looks like the Wishlist plugin works by assigning WordPress ‘roles’, or ‘levels’, to users and then restricting access to content based on these roles. Discourse lets you use ‘groups’ and ‘categories’ to restrict access to parts of the forum.

As an example, if you had a trigonometry course on your WordPress site, and you only wanted people who had signed up for that course to have access to the trigonometry discussion on Discourse, you would need to:

  • create a trigonometry group on Discourse
  • create a trigonometry category on Discourse and restrict access to that category to members of the trigonometry group and site administrators

This can be done easily through the Discourse admin section.

The custom code that would be required would be to add WordPress users who had the role that gave them access to the WordPress site’s trigonometry content to the Discourse trigonometry group. You would probably also want to redirect people who tried to access the forum’s trigonometry content from the WordPress site to the course sign up page.

I’ll look at this some more this weekend and get back to you.


(Lea-Ann McGregor) #5

While this gets fleshed out …
am I understanding that I can use the plug in to connect WordPress and discourse, set up the protected forum and manually assign it to only those who are enrolled in the course?
Automating it is preferable, but not required?
I’d just add the link to the protected forum on the wpcourse page, which is already protected by wishlist member?
Blog posts, and discourse comments, that are protected to that course would still be protected? (In bbpress, relplies are not protected in wishlist without additional plugin.)


(Simon Cossar) #6

Yes, I think that using the current setup, the easiest approach would be to not enable Single Sign On (SSO) between your WordPress site and the forum. This means that the forum and the website would manage users separately. When someone signs up for a course you would send them an invitation from the forum to join the associated discussion group. This groups content on the forum could be protected using the group/category setup. The links to that groups discussions on the WordPress site would also be protected by your membership plugin.

I think there is a small change we could make to the wp-discourse plugin that would make it possible to do something similar to this while using Single Sign On. The change would allow a WordPress user to be added to a Discourse group, by an admin, from the WordPress site. Something like this should work quite well with any membership plugin.

Complete integration between Discourse and a membership plugin is possible. This would automatically create a Discourse user and add them to a group when they sign up for a membership. The problem is that every membership plugin is different, so code would have to be written specifically for that plugin. I have started looking at doing this with the MemberPress plugin (because the people who make it gave me a copy of it to work on.)


(Lea-Ann McGregor) #7

Of course the full integration would be desirable, saving time and keeping
the integration tight. I’ve put a message on the wishlist member forum and
will message support to facilitate getting whatever you would need.

In the meantime, if we could implement sso and utilize manual adding, I can
move forward with my community launch. I’ve been looking for a forum like
discourse and the wp sso for over a year. I have been messing with bbpress
trying … Well … I will be glad to move forward. Let me know what your
need from me. Thanks!!! Lea-Ann


(Simon Cossar) #8

More information about what you are doing would be great.

Should all categories on the forum be accessible to all members, or should members only have access to the part of the forum that relates to the course they are taking?

Are memberships only for a limited period of time, or are they lifetime memberships?

Are there signed up users on your website who do not have memberships and should not be able to access the forum?


(Lea-Ann McGregor) #9

I’ve set wishlist up with two levels. Basic, which has access to limited areas, one or two forums, certain posts and pages. Then there is the subscriber level (annual payment) and they can access everything. The in between is the courses which each have their own wishlist level and access to the pages, posts and forums related to that course.

For what it’s worth, wpcourseware’s integration into wishlist member is very easy to implement. And that toggle for adding people retroactively had come in handy. WishList Member Addon for WP Courseware — WordPress Plugins

Eta: my particular implementation requires everyone to register.

Here is the API info for wishlist member: http://codex.wishlistproducts.com


(Simon Cossar) #10

Thanks for the link to the API. It looks like it will be quite easy to integrate it with Discourse.

I think that integrating Discourse with WordPress membership plugins is something that will be useful. What I would like to do is create a general wp-discourse-membership plugin that will work with all membership plugins when using wp-discourse and Single Sign On. It will still require you to manually add members to the appropriate Discourse group when they sign up for a membership on WordPress, but it will let you add the member to the Discourse group from the WordPress dashboard, before they exist as users on Discourse. I’ll try to get this done by early next week.

Once that is done, it should be quite easy to customize the plugin to hook into specific membership plugins, so that members are added to Discourse groups automatically at the time that a new membership is created on WordPress.

What is your timeline for getting this up and running?


(Lea-Ann McGregor) #11

Thank you, Simon. Frankly, I’ve had this community in mind since 2010. In the past three months all of the software is coming together to make it function the way I envisioned. I have beta testers who try the different functions out and tell me what they like and don’t like and the forum is the last piece and actually the most important to my community.
Your plan sounds great and I’m very excited. I’ll implement as soon as the single sign on and manual adding can be done and then work with you on the automation as soon as possible. Of course, the less administrative I have to do to get from purchase to using, the better the customer experience. Once everything is functional I’m scheduling time for you tube tutorials for the users as well.


(Lea-Ann McGregor) #12

Simon, will this be an update to your existing plugin or something new? How do I get on the list to be notified??


(Simon Cossar) #13

It will be a separate plugin that you will need to install along with the wp-discourse plugin. I’ll post it on here when it’s ready to try, so you will get a notification about it.


(Lea-Ann McGregor) #14

Any update @Simon_Cossar?


(Simon Cossar) #15

Sorry, it’s taking a lot longer to get to this than I had hoped. I have it planned out in my head, but I’ve been having a hard time finding time to do the work. I still think that this is a very good use for the wp-discourse plugin - it will make it possible to use WordPress/Discourse to create something similar to Moodle. The project I am currently working on should be finished this week. I’ll start work on a wp-discourse-membership plugin right after that.


(Lea-Ann McGregor) #16

Thanks for the update. Not meaning to pressure just wanted to make sure I am not waiting for something fruitlessly. :slight_smile:


(Lea-Ann McGregor) #17

[quote=“Simon_Cossar, post:10, topic:51560”] it will let you add the member to the Discourse group from the WordPress dashboard, before they exist as users on Discourse. I’ll try to get this done by early next week.
[/quote]
I didn’t miss this functionality in the wp plugin???


(Simon Cossar) #18

It’s coming soon. I shouldn’t give times, but it’s the thing I’m most interested in making as a plugin.


(Simon Cossar) #19

Since it’s now possible to add and remove users to Discourse groups through SSO, maybe all that has to be done for a membership plugin is make it so that login links to Discourse from certain areas of the WordPress site automatically add the user to a specific group. Login links that are in a protected area of the WordPress site could add the user to the Discourse group that is associated with that area. Something like this might be able to work with most WordPress membership plugins.


(Simon Cossar) #20

I’ve made a fairly basic plugin that integrates Discourse with the WishList Member plugin. It lets you associate Discourse groups with WIshList levels.

When users sign up for a WishList level, if there are any Discourse groups associated with the level, they are automatically added to those Discourse groups. If the user doesn’t yet exist on Discourse, they are created through the Discourse API.

When user levels are added/moved/removed through the WishList admin section, they are moved on Discourse.

There is an issue that new users who are created through the API are sent an activation email from Discourse. This isn’t needed because they are logged in through SSO. This can be sorted out fairly soon.

There’s a conflict between the wp-discourse ‘Create Discourse User on Login’ setting and the WishList Member plugin. That can be fixed.

For security reasons, for each group, you should either select ‘Require Email Verification’ on the WP Discourse ‘WishList Groups’ tab, or select ‘Require Email Confirmation After Registration’ on the WishList plugin’s ‘Levels’ tab.

I might eventually be selling this plugin for a small fee, but for now it’s free to anyone who’s willing to test it. Get in touch with me and I’ll send you a zip file.

The admin interface still needs some work. This was the easiest way to set it up for now.


WP integrate with Discourse and WP paid subscription plugin?