Title: Multisite   Groups   WooCommerce
Last modified: August 21, 2016

---

# Multisite Groups WooCommerce

 *  Resolved [tctc91](https://wordpress.org/support/users/tctc91/)
 * (@tctc91)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/multisite-groups-woocommerce/)
 * Is it possible to check from a SUBSITE within a network whether or not the current
   logged in user is in a specific group on the MAINSITE.
 * When users purchase items in WooCommerce, I have it so that it promotes them 
   to a ‘Premium’ group. However, this only occurs on the MAINSITE within my network
   and NOT the subsite. This is causing me problems as I **must** know whether they’re
   in the ‘Premium’ group on all sites within my network.
 * [http://wordpress.org/plugins/groups/](http://wordpress.org/plugins/groups/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [tctc91](https://wordpress.org/support/users/tctc91/)
 * (@tctc91)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/multisite-groups-woocommerce/#post-4449174)
 * Solved with the following code:
 * <?php
 *  $blog_id = 1; //set the blog id to the main site id
 *  switch_to_blog( $blog_id );
 *  $user_id = get_current_user_id();
    $group = Groups_Group::read_by_name( ‘Premium’);
   if ( Groups_User_Group::read( $user_id, $group->group_id ) ) { echo ‘PREMIUM!!’;}
   else { echo ‘Not premium’; }
 *  restore_current_blog();
 * ?>
 *  Plugin Author [itthinx](https://wordpress.org/support/users/itthinx/)
 * (@itthinx)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/multisite-groups-woocommerce/#post-4449392)
 * Thanks for sharing your solution 🙂
 *  [JosiahW](https://wordpress.org/support/users/josiahw/)
 * (@josiahw)
 * [12 years ago](https://wordpress.org/support/topic/multisite-groups-woocommerce/#post-4449522)
 * Do I need to create the group on the subsite with this code or will it automatically
   create the group in the subsite and assign the user to that subsite?
 * Also where does this code go?
 * Is there a way to sync all groups in all subsites/mainsites so that members are
   always in the same group no matter which site they are in?
 * I would pay to have this added!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Multisite Groups WooCommerce’ is closed to new replies.

 * ![](https://ps.w.org/groups/assets/icon-256x256.png?rev=983146)
 * [Groups](https://wordpress.org/plugins/groups/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/groups/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/groups/)
 * [Active Topics](https://wordpress.org/support/plugin/groups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/groups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/groups/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [JosiahW](https://wordpress.org/support/users/josiahw/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/multisite-groups-woocommerce/#post-4449522)
 * Status: resolved