Groups

Groups is a WordPress plugin that provides group-based user membership management, group-based capabilities and content access control. It integrates standard WordPress capabilities and application-specific capabilities along with an extensive API.

Extensions

  • See all related Premium Extensions for Groups in our shop.
  • Groups Drip Content is used to release content on a schedule. Content dripping can be based on user account creation, group memberships and specific dates and times.
  • Groups Restrict Categories features access restrictions for categories, tags and other WordPress taxonomies, including support for custom post types and taxonomies.
  • Groups WooCommerce Sell Memberships with Groups and WooCommerce. Groups WooCommerce grants memberships based on products. It automatically assigns a customer to one or more groups based on the products ordered. Use any payment gateway that is supported by WooCommerce, including PayPal, Stripe and many others. Groups WooCommerce also integrates with WooCommerce Subscriptions for a highly flexible membership solution.
  • WooCommerce Group Coupons This extension for WooCommerce uses Groups and WordPress roles to limit the validity of coupons.
  • WooCommerce Product Search is the essential extension for every WooCommerce store. It provides the best Search Engine and Search Experience for WooCommerce and is compatible with Groups and its access restrictions on products.
  • Groups Import Export provides import and export facilities for Groups. Users can be imported and assigned to groups, users can be exported in bulk.
  • Groups 404 Redirect allows to redirect visits to pages that are protected by Groups.
  • Groups Blog Protect restricts access to blogs based on group membership.
  • Groups File Access Groups File Access is an extension that allows to provide file download links for authorized users. Access to files is restricted to users by their group membership.
  • Groups Forums provides a powerful and yet light-weight forum system for WordPress sites.
  • Groups Gravity Forms allows to add users to groups automatically, based on form submissions.
  • Groups Newsletters helps you to communicate efficiently, providing targeted information to groups of recipients through automated campaigns.
  • Groups Notifications allows to send automatic notifications to group members and the site administrator.
  • Groups Restrict Comments Pro This extension for Groups allows to restrict who can post or read comments based on a user’s group membership.
  • WooCommerce Groups Newsletters The WooCommerce Groups Newsletters extension lets customers subscribe to newsletters at checkout.

Features

User groups

  • Supports an unlimited number of groups
  • Provides a Registered group which is automatically maintained
  • Users can be assigned to any group
  • Users are added automatically to the Registered group

Groups hierarchy

  • Supports group hierarchies with capability inheritance

Group capabilities

  • Integrates standard WordPress capabilities which can be assigned to groups and users
  • Supports custom capabilities: allows to define new capabilities for usage in plugins and web applications
  • Users inherit capabilities of the groups they belong to
  • Groups inherit capabilities of their parent groups

Access control

  • Built-in access control that allows to restrict access to posts, pages and custom content types to specific groups and users only
  • control access to content by groups: shortcodes allow to control who can access content on posts, show parts to members of certain groups or to those who are not members Shortcodes: [groups_member], [groups_non_member]
  • control access to content by capabilities: show (or do not show) content to users who have certain capabilities Shortcodes: [groups_can], [groups_can_not]

Easy user interface

  • integrates nicely with the standard WordPress Users menu
  • provides an intuitive Groups menu
  • conceptually clean views showing the essentials
  • quick filters
  • bulk-actions where needed, for example apply capabilities to groups, bulk-add users to groups, bulk-remove users from groups

Sensible options

  • administrator overrides can be turned off
  • optional tree view for groups can be shown only when needed
  • provides its own set of permissions
  • cleans up after testing with a “delete all plugin data” option

Access Control

Groups defines some capabilities of its own. The groups_read_post capability is used to restrict access to certain posts or pages to groups (and users) with that capability only.

Framework

  • Solid and sound data-model with a complete API that allows developers to create group-oriented web applications and plugins

Multisite

  • All features are supported independently for each blog in multisite installations

Your opinion counts

You & Groups

Beta-testers and developers who need to integrate group-based features in their plugins and web applications: please use it and provide your feedback.

Feedback

Feedback is welcome!

If you need help, have problems, want to leave feedback or want to provide constructive criticism, please do so here at the Groups plugin page.

Please try to solve problems there before you rate this plugin or say it doesn’t work. There goes a lot of work into providing you with free quality plugins! Please appreciate that and help with your feedback. Thanks!

Twitter

Follow me on Twitter for updates on this and other plugins.

Introduction

Content Access Control

Access restrictions on posts

On posts an pages (and custom content types) a new meta box titles Access restrictions appears. By checking Enforce read access, you can restrict access to the post to groups and users who have the groups_read_post capability. You need to assign this capability to a group and make users members of that group to allow them to see those posts.

Content visibility for members and non-members

The [groups_member] and [groups_non_member] shortcodes are used to limit visibility of content to users who are members of a group or users who are not members of a group. Multiple comma-separated groups can be specified.

Example: Limiting visibility of enclosed content to registered users.

[groups_member group="Registered"]

Only registered users can see this text.

[/groups_member]

Content visibility based on capabilities

The [groups_can] and [groups_can_not] shortcodes limit visibility of enclosed content to those users who have the capability or those who do not have it. Multiple capabilities can be given.

Example: Showing enclosed content to users who can edit_posts (standard WordPress capability).

[groups_can capability=”edit_posts”]

You can see this only if you have the edit_posts capability.

[/groups_can]

Integration in the ‘Users’ menu:

Users – group membership is managed from the standard Users admin view. Users are automatically added to the Registered group. You can add multiple users to other groups here and also remove them.

Sections in the ‘Groups’ menu:

Groups

Here you can:

  • add groups
  • remove groups
  • assign capabilities to groups

Capabilities

This is where you add, remove and manage capabilities.

Capabilities can be assigned to groups and users (1). These capabilities include the standard WordPress capabilities but you can also define additional capabilities for your web-application.

Groups defines some capabilities of its own. The groups_read_post capability is used to restrict access to certain posts or pages to groups (and users) with that capability only.

(1) Assigning capabilities to users is not integrated in the user interface yet but can be done through API calls.

Options

Administrator override :

Administrator overrides can be turned off.

Permissions :

For each role these permissions can be set:

  • Access Groups: see information related to Groups.
  • Administer Groups: complete control over everything related to Groups.
  • Administer Groups plugin options: grants access to make changes on the Groups > Options admin section.

Testing the plugin :

A convenient option is provided to delete all data that has been stored by the Groups plugin. This option is useful if you just need to start from fresh after you have been testing the plugin.

Shortcodes

Please visit the documentation page on shortcodes for up-to-date information: Groups Shortcodes

Download

Download the Groups plugin on WordPress.

2,641 Responses to Groups

  1. Lee January 8, 2023 at 11:37 am #

    Hey!

    I need to create a user, but that new user group should be automatically assigned the same user group as the person who created them.

    So say the user is Group A – the new user created currently defaults to another group. I need it to go to Group A (or whatever group the creator is in).

    Is is possible for a user to manage other users, only if they are in the same group?

    Thank you

    • Kento January 10, 2023 at 3:54 pm #

      Hi Lee,

      Thanks for asking, based on what you explain, I think this requirement also falls into the category discussed in Users managing WordPress Groups.

      Regarding the requirement to have the new user assigned to them same group(s), currently you would be able to craft a solution using Groups’ API, an OOTB solution isn’t readily available for what you want to achieve.

      As far as managing other users in general, the article goes into more detail on that topic. If you’d like to share more of your thoughts and requirement on this, please feel free to post there.

      Cheers!

  2. HQ Webmaster December 13, 2022 at 10:10 pm #

    Hi Kento,

    I’m experiencing a technical issue with the Groups plugin. We are seeing some of our WooCommerce Products are being hidden to guest users even though they don’t have any visibility restrictions in place.

    When a user is not logged in and goes to a category page, they are missing some of the products that should be listed.

    It appears that $product->is_visible() is returning false for the impacted products, but only when the Groups plugin is enabled.

    If we deactivate the Groups plugin, the products resume showing as expected.

    Can you let me know what we can try to address this? I’ve reviewed each of the group capabilities and I’m not seeing anything that should prevent them from accessing anything.

    • Kento December 14, 2022 at 7:50 pm #

      Hi there,

      Are you using the legacy model based on capabilities to restrict access or are you using groups? What you describe could be related to remnant restrictions from capabilities that ceased to be used to restrict access, thus the question.

      If you are using the legacy capability-based model : run this database query select meta_key, meta_value from wp_postmeta where meta_key = 'groups-groups_read_post'; and check if there are any results corresponding to capabilities that do not exist or are not enabled for access restriction.

      If you are using group-based access restrictions, run this database query select pm.meta_value, g.name from wp_postmeta pm join wp_groups_group g on pm.meta_value = g.group_id where pm.meta_key = 'groups-read'; and check if there are any entries that show NULL for the name column.

      The queries assume the default wp_ prefix, if your site’s database uses a different tablename prefix, make sure to adjust those.

      Let’s see if there’s anything inconsistent in your database that should be removed based on the above.

      • HQ Webmaster December 14, 2022 at 8:32 pm #

        Hello,

        There were no entries for the first query, so we must not be using the legacy version.

        For the second query, no results were found with null as the name.

        These products in question do not have any Group access restrictions set on them either, these are set to be viewable by anyone.

        Example of settings:
        https://imgur.com/cTV2e7m

        So if the user is logged in as an admin, they can see the products on the category page. If the user is not logged in, the product is for whatever reason, not visible.

        • Kento December 14, 2022 at 8:42 pm #

          Thanks for checking that, also the screenshot is useful as that shows you’re using the group-based restrictions (which is good).

          Are you using the latest versions of Groups? It’s currently at 2.17.0 and there was a fix for potential errors in that release related to inconsistent postmeta values (that could be produced for a variety of reasons). If you’re not using that latest version, please make sure to update.

          If you are using the latest version and see these issues, then I’d suggest to enable debugging and check the site’s debug.log when you try to access one of those products with a plain visitor (not logged in). Also check the server’s log for potential resource issues (memory exhausted, errors, …).

          • HQ Webmaster December 14, 2022 at 9:31 pm #

            Hi,

            I have error logging enabled but there is no errors present.

            On the archive.php the $product->is_visible() function is returning false.

            I have checked the documentation from WooCommerce and its not failing any of the checks from Woo, meaning:
            Product is set to visible in catalog and search results
            Product is set to publish status
            Product is not out of stock, nor is WooCommerce setting enabled for “Hide out of stock products”.

            The $product->is_visible() function returns true as soon as I disable the Groups plugin.

            Do you know of anything in your code that would be modifying the result? Again, the products impacted do not have any Group restrictions, they are set to visible to anyone.

            • HQ Webmaster December 14, 2022 at 9:39 pm #

              So something within your plugin is certainly what caused the issue.

              Disabling this filter that was added fixed our visibility issue with products:
              https://imgur.com/7ccrkLL

              • Kento December 15, 2022 at 1:40 pm #

                This could be related to a cache conflict. Keep in mind that with the woocommerce_product_is_visible filter disabled, some product info from protected products could be revealed where the filter is relevant. So, although disabling it will prevent the products where the issue comes up from being hidden, it is not an appropriate solution overall.

                Could you please let me know what caching system you are using on the site? Also, please give this a try: uncomment the filter, clear all caches and try to access one of the category pages where products were not shown.

                Anyhow, I’m taking note to investigate this further to see if we can avoid such issues with caching in the related code.

                • HQ Webmaster January 13, 2023 at 10:14 am #

                  Hi Kento,

                  Still trying to track down this bug. Even with the filter commented out we’re still seeing issues with products being hidden from search/category pages.

                  Here are the steps I’ve taken:

                  1. Go to /lib/extra/class-groups-extra.php, add a comment to line 35 to disable the visiblity filter.
                  2. Go to the product settings and verify that no restrictions are set on the product (bear in mind, these are products that never had a restriction on them in the first place).
                  3. Clear WP Engine Cache, Clear Sucuri Firewall cache.
                  4. Log out of the WP Admin backend
                  5. Go to category page, or search for one of the affected SKUs
                  6. WooCommerce returns “No results found”, or doesn’t display the product on the category page.
                  7. Disable the Groups plugin entirely
                  8. Attempt step 5 again, this time it returns the expected results.

                  This is beyond frustrating at this point, we’re getting numerous complaints and losing sales due to customers not being able to find products on our website. We unfortunately cannot just quit using your plugin, as we do have Pages and other items that do have content restriction settings, but I really need you guys to give us some support here.

                  This isn’t a caching issue. These products have not and will not ever have any kind of Groups visibility restriction on them. So I’m not sure why cache is being blamed, as these pages wouldn’t have any cached versions of them where the content was hidden. Users logged in as admins can see the products, while guest users cannot, even though there is no setting that should be causing that.

                  Here is screenshots of the settings of the product, as well as the post meta values for anything I think could be related to your plugin.

                  https://imgur.com/a/W0J3FGO

                  Is there some kind of field in the database that could be causing this?

                  We have a sandbox environment that I will gladly give you access to, which you can use to recreate the issue and fix it.

            • Kento December 15, 2022 at 1:33 pm #

              Thanks for checking this, that is very helpful. I’ll check your other comment and follow up there.

  3. Erik Liden November 14, 2022 at 2:36 pm #

    Hello there!

    I am trying to code a plugin that makes it so that when a visitor is logged out, all products on a WooCommerce website is visible. But when logged in, should only see the products that are assigned to that user.

    I have successfully made it possible to visit a product with a group assigned as a logged out user, using this filter: groups_post_access_user_can_read_post

    But when looking at the product feed on the website, for example browsing a certain category, it is still not possible to see the products with groups assigned to them.

    So my guess is that an additional filter is required. The filters inside the function “posts_where” seems like good candidates, but I am not sure how to use them correctly for this purpose. Could you please give some guidance on this issue?

    I am also looking to have it so that a user that is logged in, should not be able to see products which has no group assigned to them, without having to add a generic group to them. Perhaps this is possible by using some filter?

    Any help is very much appreciated!

    Best Regards
    //Erik – Templ

  4. K October 25, 2022 at 6:45 pm #

    We’ve been testing out Groups and Groups File Access for a while now, with some success. Recently, we updated our website and php settings, and now, while Groups still works, Groups File Access no longer is showing embedded video or allowing users to download our uploaded files. It worked previously.

    When we try to export, we get a blank text file, and when we re-upload our files, the entries are called invalid. The same happens when we’ve tried to upload new files.

    The filepaths have not changed, and the files are not corrupted. Any insight into this would be greatly appreciated!

    • Kento October 25, 2022 at 7:41 pm #

      Hi,

      This sounds like an issue which might be related to insufficient memory or conflicts with your overall setup and plugins involved. Please post a support request in https://www.itthinx.com/forum/groups-file-access/ so that our team can help you further. I would have created the request for you myself, but I can’t find your customer account.

      Cheers

  5. AHG October 10, 2022 at 3:52 pm #

    How can we create new groups through our own php code ?

    • Kento October 10, 2022 at 4:25 pm #

      Hi there! You can find this under Examples of the documentation pages.

      • AHG October 10, 2022 at 4:37 pm #

        Thanks for replying. Actually I am new to PHP, I have checked the examples present in the documentation already. I could not find a way to create a new group through code. The example shows how to assign a user to a group. But it does not mention, how to create new user groups. Thanks in advance for all the help.

  6. Quint July 7, 2022 at 11:06 am #

    Hi, is there any possibility i can sort on groups within the woocommerce orders tab? i.e. can i see all the completed orders in the group “members”?

    Thanks in advance.

    • Kento July 7, 2022 at 8:41 pm #

      Hi Quint,

      That’s an interesting idea, maybe we can take that into account for a future enhancement. I think it would be useful to be able to filter the orders by group memberships.

      Note taken to look into it!

      Cheers

  7. Ben Lingk July 3, 2022 at 11:16 am #

    Hello I installed the plugin, but it only works on the Desktop version. How can I add it to the mobile version?

    • Kento July 7, 2022 at 8:35 pm #

      Hi Ben,

      If you are using an App on mobile, you won’t find it integrated automatically. In that case, rather use your mobile browser to access the Groups section.

      Cheers

  8. Wilhelm June 27, 2022 at 10:16 am #

    Hi, is there any way to redirect a user to a certain page after login . I used “groups login redirect” so far but it isn’t working anymore. I saw there is a redirect shortcode but I don’t know how to use it. If it is possible, could you please give an example?

    Thanks in advance!

    • Kento June 28, 2022 at 4:39 pm #

      Hi Wilhelm,

      The login shortcode allows to indicate the redirect attribute where you can provide the URL that you want it to redirect to after login. This is documented here.

      Cheers!

  9. Lou Wallace June 22, 2022 at 6:05 pm #

    Hi,

    I work for a non profit, and we have a number of different groups within it – food, transportation, children services, community services, community development, etc. etc.

    Our website is WordPress of course and I am looking to create groups within it so individuals in those groups can access and edit their pages/post, but only theirs. The Groups plugin seems like it will wok find for that.

    However this is a publicly viewable website and we want people in the community to be able to access all of it. From what I read in the description if I assign page/posts to one group they are inaccessible to others. Does that include website visitors? I don’t me for them to edit or add, just to view and read…

    • Kento June 23, 2022 at 4:58 pm #

      Hi Lou,

      It would be great if we could use Groups that way, but you wouldn’t be able to restrict editing to a certain set of posts by group membership with it. I know of similar suggestions and we’re working on enhancing Groups so it can be used also for these cases, but I can’t give you an exact timeframe for when this would be available. Regarding the visibility to public visitors, the posts that are protected with Groups would not be visible unless the viewer is logged in and has the appropriate group membership.

      I wonder if the standard WordPress role Author would be suitable for your case? Authors can publish their own posts, but they can’t edit posts of others.

      Cheers

  10. Pablo June 21, 2022 at 6:23 am #

    Hi. Can any programmer give me some idea? maybe the “groups” plugin could be a solution.

    Scenario. Multivendor site with wfcm ultimate and wcfm group and staff + woodmart theme + woocommerce.

    in this site there are two groups.

    1 group we will call “local”.
    1 group we will call “ecommerce”.

    the “local group” should have only the catalog mode available by default. no shopping cart. only the prices.

    the “ecommerce”. group should not have the catalog mode available. This seems easy by disabling the catalog mode of Group and staff in the options it has.

    the problem is the “local” group

    They should be able to select the group that corresponds to them (local).
    then select one of the memberships for that group.
    then they should be able to upload their products in catalog mode “without having to uncheck options every time they upload a product”.
    This is the real problem. when I tested with sellers, most of them forgot to check the catalog mode and then forgot to check the “remove from cart” option.

    I can’t believe it’s so difficult. of course I tried already with the wcfm people, but without success.

    thank you.

    • Kento June 21, 2022 at 5:35 pm #

      Hi Pablo,

      Although I’m not familiar with the particular plugin you are using to manage things, based on what you explain I think these additions based on the Groups plugin might be helpful for your case:

      * groups-wc-purchasable
      * groups-wc-not-purchasable

      Anyhow, these would just be useful to provide guidance in your case, it’s very likely that you would have to create a customized solution. You might be able to take a similar approach to a “catalog mode” based on group-memberships. Your local group would seemingly also need to have prepopulated or fixed options set, which again could be determined based on the user’s group-membership.

      Also this post might be helpful for you: How to Use WooCommerce as a Catalog.

      Cheers

  11. Kento June 8, 2022 at 2:22 pm #

    There is a new tutorial How to use WordPress to provide Confidential Documents which uses Groups and Groups File Access to provide protected downloads.

    • Pablo June 21, 2022 at 8:08 pm #

      Hello, thank you for your reply. I also think that a custom modification would be needed. Both the theme and the multi vendor plugins are compatible with ACF and toolset.
      I do not know the operation of these two tools.

      I am reading the info in the links you sent me. Very interesting. I will try the solutions you detail there.

      The other solution that occurred to me is to use the catalog mode that brings the theme. I mean that the catalog mode is enabled by default. I would only have to see how to set a group that “disable” the catalog mode. I don’t think it would be very difficult.

      What I do not understand is how to make the registration process in each group automatically…

      Seller—choose group (with cart or without cart)—then register in the chosen group——-then select membership plan—start uploading product.

      ok. if i solve it i will tell you the solution. Thanks!

      • Kento June 28, 2022 at 4:51 pm #

        Hi Pablo,

        Yes, if you check whether the current user belongs to the right group (or not) you could then enable or disable the features that are not needed when you only want to show the shop as a catalog.

        If could be as simple as this:

        $catalog_only = false;
        require_once( ABSPATH . 'wp-includes/pluggable.php' );
        if ( $group = Groups_Group::read_by_name( 'Catalog' ) ) {
        $catalog_only = Groups_User_Group::read( get_current_user_id() , $group->group_id );
        }
        if ( $catalog_only ) {
        add_filter( 'woocommerce_is_purchasable', '__return_false' );
        }

        As to the question of how you could automatically assign the user account to the appropriate group, I would look for a solution that adds a selection field to the registration and then use the right action in the form plugin to add the user to the corresponding group. You will find an example of how to add the user to a group right at the top of this documentation page.

        Cheers!

  12. Jacob June 1, 2022 at 2:48 pm #

    I have Groups setup on a site and it works really well! Thanks for the plugin! I am needing to create search functionality so that users can search for other users based on their group assignment (or user role, since I have the WordPress user roles tied to each group). Is there a plugin that works with Groups to accomplish something like this? I have been searching, but haven’t found one yet.

    I am looking for functionality similar to this page: https://www.murraystate.edu/phone/ although I don’t need the department box on the right side and I don’t need the “reverse lookup” radio button functionality, just a simple text box to enter a first/last name and select a group/role to limit the search by.

    Thanks for your help!

    • Kento June 2, 2022 at 10:31 am #

      Hi Jacob,

      Thanks for using Groups! I don’t know of a specific plugin you could use for this particular search, but given that your roles and groups seem to be mapped upon each other, you might just be able to use the get_users() WordPress core function. It accepts role and search as part of the $args parameter which you could use to search users by role that match the keyword.

      If later on you need to work more specifically with groups, I’d also recommend to look at the Examples of the API section of the documentation. But at this point, you probably won’t need to use Groups’ API itself given the role-group mapping.

      Cheers

      • Jacob June 2, 2022 at 2:17 pm #

        Hey Kento!

        Thanks for the response! This was the path I was thinking to go down if there wasn’t already something else in place. I will just build out a custom solution with get_users().

        Thanks for pointing out the API for Groups. That could definitely come in handy down the road!

        Thanks again!

        • Kento June 3, 2022 at 4:34 pm #

          Perfect, good luck with the implementation!

  13. Kento June 1, 2022 at 11:58 am #

    New tutorial available as a miniseries, teaches you how to mix free and paid content and sell memberships:

    How to sell Online Courses with free and paid Content – Part 1 and Part 2

  14. Wilhelm June 1, 2022 at 11:23 am #

    Hello, I am using the groups plugin on wordpress and would like to translate the login box. Where can I do this because I cannot find anything in the pot files? Thanks

    • Kento June 1, 2022 at 12:03 pm #

      Hi Wilhelm,

      If you are using the [groups_login] shortcode, it uses wp_login_form() so you won’t find any translatable strings related to Groups, as these are translatable strings related to WordPress core.

      Cheers

  15. Erik Liden May 25, 2022 at 11:20 am #

    Hi guys,

    I have a question, as far as I understand, if a product in WooCommerce does not have any group tied to it, it will be visible to all users. Is it somehow possible to make it so that users in a certain group only see products that are associated with that group and no other products, even those without any product associated with them?
    Cheers
    Erik

    • Kento May 25, 2022 at 6:21 pm #

      Hi Erik,

      First you would have to protect all products with a generic group used for that purpose. Protect all products with that group, that would achieve the effect of hiding all products from anyone. Then, for those who should be allowed to see certain products, also add those products to their group.

      So, for example, let’s call the generic group “Generic” … protect all products using that group. None of the users who should only see a limited set of products should belong to this group.
      Assume a second group “Specific” and assign some products to it. Now you have a set of products which are related to the “Generic” and the “Specific” group.
      Add a test user to the “Specific” group and log in as that user. The user will be able to see those products and none of the others.

      Cheers

  16. Picero May 23, 2022 at 11:46 am #

    Hello, I tried your group plugin and it is easy to use. I am using it for hiding some pages in navigation for nonregistered users. I’d like to know if it is possible, when a registered user login into page with his username and pass, that he is redirected to a member page not to dashboard or I must use some other plugin for redirecting users?
    Thank you and best regards,
    Picero

    • Kento May 23, 2022 at 1:17 pm #

      Hi Picero,

      The Groups 404 Redirect extension for Groups would be appropriate for this. It’s free and the documentation page for it is here, please give it a try.

      Cheers

      • Picero May 24, 2022 at 7:16 am #

        Thank you!

  17. Dean Baker April 21, 2022 at 8:08 pm #

    Hi, I am hoping to get some quick help on this. I have 2 groups: group1 and group2. All users in group2 are also in group1. There are however users in group1 that are not in group2. I want to have a WooCommerce product “X” be seen by group2, and product “y” be seen by users in group1 that are NOT in group2. I am hoping to keep it so that group2 does not see both. It is fairly easy to do this type of logic in Gutenberg blocks with the ability to nest the blocks combined with the member and non-member blocks. I don’t see how to do this in the Groups/Woocommerce integration. I am hoping to do this without having to create a group3 to include the subset (users in group1 that are NOT in group2). I hope this makes sense. Any thoughts would be helpful.
    Thanks in advance.

    • Kento April 29, 2022 at 12:31 pm #

      Hi Dean,

      For this customized rule you would have to use filters on parts of the post access control system. A start would be to use the groups_post_access_user_can_read_post filter where you would check the group memberships using Groups’ API (see Examples on how to obtain a user’s membership for a particular group). You might also need to use the groups_post_access_posts_where filter to make sure that the exclusion is upheld when WordPress retrieves sets of products, e.g. when showing them in the shop.

      As you can see, this requires a certain level of customization on your part, but if you know how to work with filters or use an experienced developer to do this for you, it’s quite easy actually.

      Cheers

  18. Antoinette April 5, 2022 at 2:35 pm #

    Greetings,
    How do I preview the groups I’ve created? The system did not produce a link once I created a group in the WP dashboard.

    I’d like to see what the user interface looks like for group members — i.e., can they see the top or right navigation bars of my theme?
    Thanks,
    Antoinette

    • Kento April 5, 2022 at 4:56 pm #

      Hi Antoinette,

      It would be suitable to create one or more test user accounts that are assigned to the groups you would like to check out. You can work with your administrator account in one browser and work with a test user in another browser while you test things. The menus will usually contain items depending on whether the users have access to their content, e.g. if you create a Page menu item and that page is protected, only members of the corresponding group will see the item. This does not apply to custom links. I’d recommend to have a look at the documentation, for example the section on Access Control where you can find more info and ideas.

      Cheers

  19. Felipe March 12, 2022 at 11:00 am #

    Hi! I’m creating a post form on the frontend. How do I display a list of groups and select? The plugin I will use is ACF.

    • Kento March 24, 2022 at 1:08 pm #

      Hi Felipe,

      I’m not aware of a particular integration with Groups for ACF. What you could do, is try to use Groups’ shortcodes or API maybe inside a customized template.

      Cheers

  20. Tamryn February 11, 2022 at 4:20 am #

    Hello – Thank you for taking my question. Can members in groups upload photos or files or videos with Groups?

    • Kento February 18, 2022 at 9:39 pm #

      Hi Tamryn, thanks for asking! To let group members upload files you could use a protected section along with a form plugin. The uploaded files would however not be restricted to the group members. We do provide a premium extension Groups File Access but it allows to manage protected files via the back end where users with administrative rights can upload files and determine which group members can access them. But this extension would not allow group members without administrative rights to upload files.

  21. Tamryn February 9, 2022 at 6:46 pm #

    Hello – can you please tell me if all of the Groups plugins are available for wordpress.com sites (not wordpress.org)? Thank you in advance 🙏♥

    • Kento February 10, 2022 at 1:59 pm #

      Thanks for asking!

      To be able to install any plugin, you need to have at least the Business plan on WordPress.com – see https://wordpress.com/pricing/ – if that’s what you have in mind, you can install its extensions.

      Cheers

      • Tamryn February 11, 2022 at 4:14 am #

        Hello Kento,

        Thank you for showing me where to find it. This is so helpful 🙂

  22. Tamryn February 9, 2022 at 6:41 pm #

    Hello – can you tell me please if Groups is compatible with Thrive Themes?

    Thank you 🙂

    • Kento February 10, 2022 at 1:57 pm #

      Hi Tamryn,

      I guess so, simply try it out? It works with any theme as long as the theme doesn’t do weird stuff with post types.

      Cheers

      • Tamryn February 11, 2022 at 4:13 am #

        Thank you Kento for your answer 🙂

  23. Brandon January 30, 2022 at 10:15 pm #

    I would like to display a list of the users of groups that are assigned to posts with a short code, what would be the shortcode to do this? Some posts might have multiple groups assigned to the them so the list needs to include all of the users from the assigned groups.
    Thanks

  24. Andrew Batallones January 21, 2022 at 4:31 pm #

    Hello,

    I want to see if when a customer changes groups or gets assigned a new group if the customer’s modified_date timestamp gets updated. If not, is this something that could get implemented with this plugin?

    Thank you!

    • Kento January 26, 2022 at 10:52 am #

      Hi Andrew,

      A group membership would not necessarily modify the timestamp unless that happens because you are e.g. editing the user on the back end. If you want to assure that the timestamp is modified on every group membership event for a user, you could use these actions to hook into and modify the timestamp appropriately:

      – groups_created_user_group
      – groups_updated_user_group
      – groups_deleted_user_group

      These actions are documented on https://docs.itthinx.com/document/groups/api/actions/

      Cheers

  25. kia January 18, 2022 at 8:06 pm #

    Hi,

    I’d like to request a feature / report an issue.
    A user that’s in a group with permission to add posts can only see the groups they are in or that their group is parent of when adding a post, which is good; this is expected behaviour.
    But when the same user scrolls through the list of posts (https://my-wp-url.org/wp-admin/edit.php), that their group has permission to see, there is unexpected behaviour: In the “groups” column, the user can also see groups (out of the hierarchy) that their group is not parent of, so groups they shouldn’t see, like when adding a post.

    Example:
    Having users Jane and John and groups “cool”, “great”, “genius” and “special” with hierarchy genius > great > cool (where ‘>’ means parent of) and “special” which coexists apart from hierarchy and contains some special users that might be in some of the other groups.
    Jane is in group “genius”, John is in groups “great” and “special”.

    When John adds a post, he can choose whether he wants to restrict the post to members of “great”/”special” or make it visible to the “cool” members, too. Which, again, is expected.
    When John scrolls through all the posts he has access to, he finds a post, that was added by Jane and restricted to “special” members which John is a member of, so he can see the post, which is fine. But Jane also released this post to some other group, say “buddies” whose group name is now visible to John in this view. This is unexpected.

    Thanks for taking a look at this!
    Cheers

    • Kento January 20, 2022 at 3:35 pm #

      Hi kia,

      Many thanks for describing this in detail! Yeah we should probably hide those group names from those who are not members. Note taken to include in an update.

      Cheers

      • Kento January 20, 2022 at 4:11 pm #

        On second thought … it could also be considered useful and necessary that the group(s) that John in this case is not a member of are visible to him. Consider that for example Jane might need to grant access to the “buddies” group and would like John to be aware of it, even though he doesn’t belong to them. In fact, if John goes in and makes a change and saves the post, if he doesn’t belong to the group, those members won’t have access anymore. Example:

        We have these groups: Health, Fruit and Vegetables.

        John and Jane are both members of the Health group.
        John is a member of Fruit.
        Jane is a member of Vegetables.

        John creates a new Post and restricts it to the groups Health and Fruit.
        Jane can see that the Post is restricted to those groups on the Dashboard under Posts.
        Now Jane edits this same Post, but she will only be offered the Health or Vegetables groups for restriction. Even though the Post is still protected by both the Health and the Fruit groups, she will only see Health in the Groups > Read field. If Jane saves the post, she might think that she’s not changed anything, but she’s actually removed access to the post from the members of the Fruit group.

        • kia January 26, 2022 at 5:54 pm #

          Hey Kento,

          Thank you for your reply. I thought a bit about it and I’m partly confused.
          Shouldn’t it be that all changes that are made on a post are connected to that post and not to the groups?

          But I see that it makes sense that someone knows if they edit a post that these changes might be visible to other people too.

          So maybe it makes sense to show an information that informs the user that the post is visible to other groups that this user isn’t part of.

          So in your example, Jane would see her groups as described and an additional note that there are other groups that can see the post.

          Cheers,
          Kia

          • Kento January 31, 2022 at 11:52 am #

            Hi Kia,

            Many thanks for your thoughts on that.

            > Shouldn’t it be that all changes that are made on a post are connected to that post and not to the groups?

            I would say yes and no, depending on what perspective one would assume. I think that the confusion comes from the mix of a) users can edit posts depending on role and b) users can assign groups depending on their group membership.

            Ideally, a user who creates and maintains a post would be able to lock/protect a post from editing by other users who do not belong to the “right” group(s). The problem IMO is that we still do not have fine-grained permissions that would allow to act on particular objects (i.e. posts in this case).

            > So maybe it makes sense to show an information that informs the user that the post is visible to other groups that this user isn’t part of.

            Yes, I think that it makes sense that everyone who can edit posts can see what groups are granting read/view access to a post, even though they do not belong to all groups that are related (but as long as they belong to at least one of them, otherwise they wouldn’t be able to see the post listed).

            > So in your example, Jane would see her groups as described and an additional note that there are other groups that can see the post.

            Maybe it would be a good idea to show that a group is “locked” when a user is editing a post with a group that the user does not belong to. But my gut tells me this would be going in a direction where we’re patching up things as a consequence of having incomplete administrative features (features which in fact we do currently lack).

            I reckon that as long as we don’t have a fine-grained permission model underlying, these scenarios will always be ambiguous and confusing. The good news is that we’ve been looking into this and working on extending our data model to make that happen, but it still seems a long stretch until we can get to something that is pragmatic.

            I’d love to hear feedback from anyone who’s following these ideas around Groups.

            Cheers

            • kia February 6, 2022 at 7:42 pm #

              Hi Kento,

              Many thanks for your reply.

              I see, there’s quite some things to consider for not producing unexpected behaviour …
              Maybe a safe way that does not include major reconstruction would be to only extend the groups column (e.g., in the list of posts) with a note that other groups have access to a content without spoiling the groups’ names. This would be consistent with the selection of groups that a group member sees when producing their own content.

              However, I don’t want to bother you too much on this! If you think this makes sense, it’d be nice to have this feature included in a further release. If not, I’ll survive it 😉

              Cheers!

              • Kento February 10, 2022 at 2:14 pm #

                Thank you very much for your ideas, it’s not a bother at all but really valuable feedback!

                What you suggest also makes sense to me, maybe not for everyone, but I can see that in certain cases it would. We could consider that even via filters that allow to adjust what Groups is showing so one can easily customize those views.

                The more I think about it, the more complex the scenarios get 😀 …

  26. Isidro Calabuig December 7, 2021 at 9:01 am #

    Hi, can a group have an admin user? I mean, an user that have more capabilities than a regular one, like add and delete users of their group.

    Is it possible? Thanks!

    • Kento December 18, 2021 at 10:44 am #

      Hi Isidro, good question and in line with what we are working on as an extended data model for Groups. At the moment, the permissions related to groups are rather coarse, meaning that you cannot determine a specific permission for someone towards a specific group.

Leave a Reply

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share