Woocommerce integration with Discourse

(Sarah L) #1

Hello! Newbie Discourse user here. Really loving it so far.

I currently run a subscription service using WooCommerce Subscriptions, linked to a learning management platform via Zapier.

I would love for my members to automatically get access to a restricted forum. I’ve looked at the SSO plugin but it doesn’t seem immediately obvious it will do that.

Can anyone please suggest a way of achieving this, either via Zapier (I know there’s no direct integration but I saw some things can work via web hooks) or a plugin? Or will it need custom hackery?

Thank you!

2 Likes
(Tom Knight) #2

This should do it.

Single Sign On

The plugin comes with optional SSO functionality which lets you use your WordPress site as the Single Sign On provider for your Discourse forum.

2 Likes
(Sarah L) #3

Thank you! Will have a look :slight_smile:

1 Like
(Jay Pfaffman) #4

You’ll likely need to add some hooks to connect your WooCommerce subscriptions to Discourse groups. There are some topics with examples. If sticking code in a functions.php file isn’t in your wheelhouse you can post in #marketplace with a budget.

3 Likes
(Sarah L) #5

Thanks. I can do sticking code in functions.php, and a bit of tinkering but I can’t necessarily do the writing fresh code. Have searched for woocommerce subscriptions but nothing’s coming up :grimacing:

(Jay Pfaffman) #6

I’ve not seen anyone do WooCommerce subscriptions. Look in Discourse Meta - The Official Support Forum for Discourse and you’ll find examples for things like MemberMouse and Paid memberships pro. It sounds like you should be able to find examples that will give you enough to go on.

Oh. check this Managing Discourse group membership with WP Discourse

Search results for 'wp-discourse #howto ' - Discourse Meta is how to find that.

6 Likes
(Sarah L) #7

Hero! Thank you very much :slight_smile:

1 Like
#8

Search for WordPress membership instead.

Here’s an example with WooMembership:

2 Likes
(Sarah L) #9

Perfect! Thank you :slight_smile:

1 Like
(Simon Cossar) #10

For using SSO with WP Discourse and Woocommerce, you may need to add this plugin to your site: GitHub - scossar/wp-discourse-woocommerce-support: Integrates the wp-discourse plugin with WooCommerce.

The plugin’s README explains what it’s doing. Instead of installing the wp-discourse-woocommerce-support plugin, you can copy the code from the README’s ‘Alternatives to installing the plugin’ section into your theme’s functions.php file.

8 Likes