# Sync WooCommerce Memberships with Discourse groups

**URL:** https://meta.discourse.org/t/sync-woocommerce-memberships-with-discourse-groups/118485
**Category:** Extras
**Tags:** pavilion
**Created:** [May 23, 2019, 7:13am UTC](https://meta.discourse.org/t/sync-woocommerce-memberships-with-discourse-groups/118485 "2019-05-23T07:13:06Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![Ed\_Bobkov](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ed_bobkov/32/200014_2.png) [@Ed\_Bobkov](https://meta.discourse.org/u/Ed_Bobkov)
#### Post date: [May 11, 2020, 4:45pm UTC](https://meta.discourse.org/t/sync-woocommerce-memberships-with-discourse-groups/118485/8 "2020-05-11T16:45:55Z")

</div>

What changes should I make in my case? I have a little bit different situation. Here are the differencies:

1. I have Wordpress as a SSO Client, users login via Discourse.
2. I installed a WP plugin ‘WooCommerce Groups’: [Groups WooCommerce Documentation - WooCommerce](https://docs.woocommerce.com/documentation/plugins/woocommerce/woocommerce-extensions/groups-woocommerce/) . It’s similar to WooCommerce Memberships but with less functions. I think all core function are the same.
3. I have multiple groups in Discourse (more than 3) and that’s why 3 groups of access in WP.

Can you provide me with corrections for this code or some advice? Thanks!  
May be, you can help? @pfaffman @simon

Ah, I didn’t write a question there…  
So I need to activate this integration between WP and Discourse.

What is working:

1. Wp is working as a SSO client.
2. Memberships are selling through WP Groups plugin and expiring =\> users are added to necessary groups.
3. Users are deleted from groups on expiration.

I need:

- when user is added to a group in WP I need to add this user to specific group in Discourse
- when is deleted from that group in WP - delete in Discourse  
Multiple groups in WP and Discourse

---

_[View the full topic](https://meta.discourse.org/t/sync-woocommerce-memberships-with-discourse-groups/118485)._
