# Trying to bring paying members from wp to discourse

**URL:** <https://meta.discourse.org/t/trying-to-bring-paying-members-from-wp-to-discourse/125201>\
**Category:** WordPress\
**Created:** [August 8, 2019, 7:21am UTC](https://meta.discourse.org/t/trying-to-bring-paying-members-from-wp-to-discourse/125201 "2019-08-08T07:21:20Z")\
**Posts on this page:** 4\
**Page:** 1

## AI-generated summary

[helmi](/t/-/125201/1) is seeking guidance on integrating WordPress membership roles with Discourse to restrict forum access based on payment status. They want to ensure that only paying members can access the forums, and that access is revoked when subscriptions end. [tshenry](/t/-/125201/2) points to two guides on managing group membership between WordPress and Discourse, but [helmi](/t/-/125201/3) finds the solutions too hacky and potentially hard to maintain. [pfaffman](/t/-/125201/4) suggests that if membership roles don't change frequently, the setup might still be manageable, and recommends alternatives like Memberful, ProCourse Memberships, or Patreon for membership management.

<div class="post-metadata">

**Author:** ![helmi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/helmi/32/114772_2.png) [@helmi](https://meta.discourse.org/u/helmi)\
**Post date:** [August 8, 2019, 7:21am UTC](https://meta.discourse.org/t/trying-to-bring-paying-members-from-wp-to-discourse/125201/1 "2019-08-08T07:21:20Z")

</div>

Hey there,

trying to find a good setup for a membership project. The current plan is to have either an external provider or something wordpress based for the payment. Either way the users will be held in wordpress and assigned to roles based on their status of payment.

In [this thread](https://meta.discourse.org/t/role-based-access-control/78606) I read that groups/roles are transfered from wp to discourse but couldn’t find any hints how this is handled within the [wp discourse](https://github.com/discourse/wp-discourse) settings.

Can anyone hint me to where I can get this information? So basic goal is to only give users access to the forums that are paying members. As soon as the cancel their subscription or similar I move them to different roles in WP and want them to not have access to discourse anymore (or maybe in a more complicated setup to certain groups).

Any tips are appreciated. Thank you!

Helmi

---

<div class="post-metadata">

**Author:** ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)\
**Post date:** [August 8, 2019, 7:50am UTC](https://meta.discourse.org/t/trying-to-bring-paying-members-from-wp-to-discourse/125201/2 "2019-08-08T07:50:46Z")

</div>

The following guides should be what you are looking for:

> [@Manage group membership in Discourse with WP Discourse SSO](https://meta.discourse.org/t/managing-discourse-group-membership-with-wp-discourse/74724):
>
> [WP Discourse](https://github.com/discourse/wp-discourse) functions The [WP Discourse](https://github.com/discourse/wp-discourse) plugin has a couple of functions that can be used to associate WordPress users with Discourse groups. These functions are only enabled on sites that are using WordPress as the SSO provider for Discourse. add\_user\_to\_discourse\_group( $user\_id, $group\_names ) [View Code](https://github.com/discourse/wp-discourse/blob/main/lib/utilities.php#L278-L301) remove\_user\_from\_discourse\_group( $user\_id, $group\_names ) [View Code](https://github.com/discourse/wp-discourse/blob/main/lib/utilities.php#L303-L326) Each of these functions take the same two parameters: $user\_id: the WordPress user’s id $group\_names: a comma separat…

> [@Understanding groups and category permissions](https://meta.discourse.org/t/how-to-use-category-security-settings-to-control-access-to-content/87678):
>
> bookmark This guide explains how to manage category visibility and user permissions using groups in Discourse. person_raising_hand Required user level: Administrator Groups and category permissions are crucial for managing access and content creation within your Discourse community. This guide will help you understand how to use these features effectively. Summary Category permissions control visibility and user actions Permissions are managed through group access lists Different perm…

---

<div class="post-metadata">

**Author:** ![helmi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/helmi/32/114772_2.png) [@helmi](https://meta.discourse.org/u/helmi)\
**Post date:** [August 8, 2019, 11:56am UTC](https://meta.discourse.org/t/trying-to-bring-paying-members-from-wp-to-discourse/125201/3 "2019-08-08T11:56:29Z")

</div>

thanks, Taylor. That basically looks like what I was looking for but it’s a way more hacky solution than I hoped it would be. I fear the maintainability of that hack makes it a no go. I’ll go and see what else could be done.

thank you!

---

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [August 8, 2019, 2:13pm UTC](https://meta.discourse.org/t/trying-to-bring-paying-members-from-wp-to-discourse/125201/4 "2019-08-08T14:13:33Z")

</div>

Unless you change your membership roles frequently, it’s not that bad.

If wordpress is only for membership management you might check out memberful, procourse memberships, or Patreon.
