# Super simple Discourse-Wordpress-membership integration

**URL:** https://meta.discourse.org/t/super-simple-discourse-wordpress-membership-integration/260145
**Category:** WordPress
**Created:** [March 31, 2023, 7:02pm UTC](https://meta.discourse.org/t/super-simple-discourse-wordpress-membership-integration/260145 "2023-03-31T19:02:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Franz1](https://avatars.discourse-cdn.com/v4/letter/f/8e7dd6/32.png) [@Franz1](https://meta.discourse.org/u/Franz1)
#### Post date: [March 31, 2023, 7:02pm UTC](https://meta.discourse.org/t/super-simple-discourse-wordpress-membership-integration/260145/1 "2023-03-31T19:02:16Z")

</div>

Hello,  
I read all this thread and am frightened:

> [@Manage group membership in Discourse with WP Discourse SSO](https://meta.discourse.org/t/manage-group-membership-in-discourse-with-wp-discourse-sso/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…

It looks extremely complicated and prone to break with updates.

So to keep things as simple as possible, let’s totally disregard the money issue and just consider that a part of a Wordpress site and a part of a Discourse forum are gated. Discourse does the SSO with the Wordpress plugin and [Discourse Subscriptions](https://meta.discourse.org/t/discourse-subscriptions/140818) creates the gate on the Discourse side.

Discourse Subscriptions is an official plugin and will be probably maintained and seems simple enough.

But I suspect there is even a simpler way to create gated content on Discourse without using Discouse Subscriptions.

But then the hard part: Is there a free or low cost Wordpress membership plugin that was able to easily integrate with Discourse to create gated content on Wordpress?

Also I have a N8N (an open source equivalent of Zapier) installation that is already connected to Discourse and that transfers some information to Mautic. May this N8N installation be used to sync the gated content between Discourse and Wordpress?

If you think that I am wrong and that there is a easier way to do that, please tell me.  
Best

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [April 3, 2023, 12:31am UTC](https://meta.discourse.org/t/super-simple-discourse-wordpress-membership-integration/260145/2 "2023-04-03T00:31:27Z")

</div>

Hey there @Franz1,

> [@Franz1](#):
>
> [Manage group membership in Discourse with WP Discourse SSO](https://meta.discourse.org/t/manage-group-membership-in-discourse-with-wp-discourse-sso/74724)
> 
> It looks extremely complicated and prone to break with updates.

I understand that integrations can be intimidating!

While the solutions mentioned in that post require the addition of some functions to Wordpress, they’re not prone to break with updates. The [WP Discourse](https://github.com/discourse/wp-discourse) plugin (also an official plugin) provides the utility functions described in the post and is maintained in line with Discourse in the same way the Discourse Subscriptions plugin is.

I’ve used these integrations myself on multiple production instances over a number of years. In a similar vein this is another integration you can use

> [@Sync WooCommerce Memberships with Discourse groups](https://meta.discourse.org/t/sync-woocommerce-memberships-with-discourse-groups/118485):
>
> This Plugin allows you to Sync WooCommerce Memberships with Discourse Groups. Pre-requisites For this to work you have to have [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) enabled, with either Wordpress or Discourse as the [DiscourseConnect](https://meta.discourse.org/t/13045?silent=true) provider. Steps Install this Wordpress plugin [GitHub - paviliondev/discourse-woocommerce · GitHub](https://github.com/paviliondev/discourse-woocommerce). Use the Wordpress theme editor to update these numbers to the WooCommerce plan\_id and Discourse group id and group\_name you want to sync $member\_group\_map[] = (object) array('plan\_i…

> [@Franz1](#):
>
> Also I have a N8N (an open source equivalent of Zapier) installation that is already connected to Discourse and that transfers some information to Mautic. May this N8N installation be used to sync the gated content between Discourse and Wordpress?

While that’s possible, that’s much more likely to break than using the solutions described in the linked posts.

---

<div class="post-metadata">

### Author: ![Franz1](https://avatars.discourse-cdn.com/v4/letter/f/8e7dd6/32.png) [@Franz1](https://meta.discourse.org/u/Franz1)
#### Post date: [April 3, 2023, 12:24pm UTC](https://meta.discourse.org/t/super-simple-discourse-wordpress-membership-integration/260145/3 "2023-04-03T12:24:35Z")

</div>

Many thanks my dear friend for you efforts to help me. I’ll try to follow your teachings, but I am grateful to have at least a direction.  
Best
