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,679 Responses to Groups

  1. Rahul Bansal April 12, 2013 at 9:41 am #

    This plugins disable new post creation, installing new plugins and few more things when deactivated.
    When activated, these option work again but it looks like once you install it, there is now way to uninstall this plugin without breaking your site.

    • antonio April 15, 2013 at 10:50 am #

      Hi,
      this behavior is unusual, if you want, send us data access to support at itthinx dot com, so we can have a look.

      cheers

      • Rahul Bansal April 17, 2013 at 10:48 am #

        Hi Antonio,

        I sent details to support at itthinx dot com 2-days back. Can you confirm if you manage to debug it?

        • kento April 17, 2013 at 11:12 am #

          We’ve had a look, it’s an odd thing what happens there but, I think something has messed up your capabilities and when Groups is active it helps to regain some control. What I would suggest in this case is to first disable all plugins (some plugins even must be deleted, e.g. some caching plugins, to completely remove their effects) then check if everything looks as normal. If it doesn’t, you’re site’s messed up to say it bluntly … if it looks ok, start enabling plugins individually until you find which one actually interferes with for example the Posts section.

  2. Norbert April 7, 2013 at 5:37 pm #

    Hello,
    I have istalled your plugin and I can use it on regular pages and post. But it doesn’t works with “WP Download Manager” “Package” called post type. It is enabled for this post type as you seen in attached picture ( http://screencast.com/t/QzL7izdCt ) but I see the short code in frontend. ( http://screencast.com/t/e7f1YHspOd7P ) If I put the same snipet to a regular page it works fine. How can I enable your plugin in this post type? This is the plugin: http://www.wpdownloadmanager.com/
    Thanks for help!

    • antonio April 8, 2013 at 10:00 am #

      Hi,
      I have tested Groups together WP-DownloadManager, and this works fine, an example:
      [groups_member group="Premium"]
      [download id="2"]
      [/groups_member]

      Careful editing text mode.
      Maybe your error is a conflict with other plugin.

      cheers

  3. Kirk Wight April 5, 2013 at 8:34 pm #

    Suggestion for enhancement: it would be great to be able to assign posts to groups in bulk on the edit.php page. Has this ever come up before?..

    • antonio April 8, 2013 at 9:18 am #

      Hi,
      thanks, all suggestions are welcome

      cheers

    • Jamie Halmick April 30, 2013 at 3:01 am #

      Yes! I second this request!

      • antonio May 1, 2013 at 10:23 am #

        thanks Jamie.

  4. Moonworks April 5, 2013 at 12:25 am #

    I’ve used the following shortcode:

    [groups_non_member]

    But I’m still able to see it on an account that has membership of a group. Is there a way to fix that?

    Also, is it possible to place a shortcode within a shortcode? So if I only want somebody who is a member of two groups to see something, it will work? for example:

    [groups_member group="Whisper - By Michael Bray"]
    Thank you for signing up for a date on the virtual book tour of Whisper by Michael Bray.

    Please find the available downloads below:
    Guest Blog
    Interview
    Book Excerpt
    [groups_member group="Reviewers"]
    Review Copy
    [/groups_member]
    [/groups_member]

    • antonio April 5, 2013 at 8:36 am #

      Hi,
      [groups_non_member] works similar to [groups_member], you need set a group.For example:
      [groups_non_member group="groupA"]bla bla bla [/groups_non_member]

      It is not possible to place a shortcode whithin a shortcode. You can create a “super-group”(groupC) that represent groupA + groupB, and then use [groups_member].

      If you need show anything to a groupA OR groupB OR groupC… you can use ‘,’, for example:
      [groups_member group="groupA,groupB,groupC]bla bla bla[/groups_member]

      cheers

  5. Moonworks April 5, 2013 at 12:03 am #

    I’m having a bit of trouble.

    I’m using the WooCommerce groups exension, but I don’t see how I can manually add a member to a group. I’ve taken a look in the users admin, but don’t see anywhere in there that allws me to do it.

    Thanks

    • antonio April 5, 2013 at 8:05 am #

      Hi,
      you can see it in “Users” admin page, above the users table, you have ” Add/Remove selected to / from group:____”

      cheers

  6. Amanda April 4, 2013 at 5:04 am #

    Hi Kento,

    Thank you for all of your hardwork on this plugin. I am using it and planning on integrating with your Woocommerce groups plugin. I found one thing that I thought I would mention. Using the shortcodes, I have a page created that shows a message to non group members letting them know they do not have access, then I have another short code for group members displaying the content. This works great – unless the user is in two groups. Then it will show both blocks of content. Is there a way to prevent this?

    Also, this is great for hiding the content of the page, but is there a way to also hide the comments – so protecting an entire page of content including comments from anyone not in the group?

    Thanks!
    Amanda

    • antonio April 5, 2013 at 7:49 am #

      Hi,
      you can protect an entire page using capabilities (create a capability by group, and check this in post/page).
      Please share us the shortcodes you use for show blocks of content.

      cheers

  7. James April 1, 2013 at 5:22 pm #

    If i want to display a message on the page that is restricted to users who are not in the group that has access to a particular page instead of showing a 404 error how do I do that?

    even the 404 extension doesn’t make much sense, in each page that is restricted to a certain group i need to display a different message.

    Is there a way to do that?

    Thanks

    • antonio April 2, 2013 at 6:20 am #

      Hi James,
      you can do it with Groups 404 Redirect (http://www.itthinx.com/plugins/groups-404-redirect/)

      cheers

      • James April 2, 2013 at 3:42 pm #

        Hi Antonio,

        Thanks. but i still can’t see how it can redirect each separate restricted page to a different page. I have installed it and as far as I can tell it is one global setting of all restricted pages redirect to one single page.

        What restricted pages should do is display a message instead of a 404 redirect or this redirect from the 404. each restricted page should have a message of it’s own. don’t you think?

        • kento April 2, 2013 at 6:41 pm #

          James there’s a very simple way, you can use the Shortcodes to conditionally display content based on group membership.

  8. Robert March 27, 2013 at 5:51 am #

    I installed the Groups plugin, deactivated, and then re-activated. When I reactivated the control panel under settings had disappeared. To fix it I deleted the entire plugin and reuploaded. After I activated it I noticed that the Settings>Groups control panel was still missing, although the older options in the individual posts were still visible.

    Why can’t I see the control panel for Groups?

    • antonio March 27, 2013 at 9:36 am #

      Hi,
      This behavior is not the usual. When you reinstall Groups you must have a new menu Item called “Groups”, and not a subitem in menu Settings.
      Please download the lastest version, and try it.

      cheers

      • Robert March 28, 2013 at 6:13 am #

        I tried and it didn’t work. I also tried uninstalling, deleting cache, and then reinstalling. It didn’t work.

        • antonio March 29, 2013 at 9:55 am #

          Hi,
          you can test groups with other plugins disabled.
          if it doesn’t work, if you grant me edit access to the page it’s on I could have a quick look.

          cheers

  9. Fred March 25, 2013 at 9:50 am #

    Hello,

    Do you have plugin Groups in french?

    Best regards

    • antonio March 25, 2013 at 11:57 am #

      Hi,
      not currently in French. You can create it on wp-content/plugins/groups/languages
      You can use http://www.poedit.net/ for this.

      If you create it I’d appreciate if you send it to support at itthinx dot com.

      cheers

  10. Dmitry March 20, 2013 at 8:57 pm #

    Hello.
    When I activate the Groups plugin I get this error message:
    Fatal error: Call to undefined function wp_get_current_user() in /var/www/username/www/friends10.ru/wp-includes/user.php on line 209.
    On site installed Traction theme. I’m using latest WordPress version.
    Can you help me, please.

    • antonio March 21, 2013 at 8:00 am #

      Hi,
      if you can, try to change the theme to default theme.
      If the problem persists, try disabling the plugins one by one.

      cheers

      • Dmitry March 23, 2013 at 6:28 pm #

        Thanks for your reply. On default theme Groups plugin activate OK, but I can’t disable any plugin because every plugin on my site very need. Sorry for my bad English 🙂

        • antonio March 25, 2013 at 9:36 am #

          I’m glad, then with the default theme works well.

  11. Virgo March 12, 2013 at 9:28 am #

    Hi Kento,

    Is there a way to get the current group of a logged-in user inside the code of another plugin, or somewhere in the theme?
    thank you very much.

    • antonio March 13, 2013 at 9:07 am #

      Hi Virgo,
      you can use:

      require_once(ABSPATH . "wp-includes/pluggable.php");

      $user = new Groups_User(get_current_user_id());
      $groups = $user->__get("groups");

      More info here: Groups-API

      cheers

  12. Marc March 9, 2013 at 9:19 pm #

    No, the only thing I changed was installing Total Cache

    • antonio March 11, 2013 at 2:43 pm #

      Hi Marc,

      can you export W3 Total Cache settings, and send us by email, please?
      In http://www.itthinx.com/contact/ you can view the email.

      To export settings: Performance-> General settings -> Export/import settings.

      thanks

  13. Will March 8, 2013 at 10:53 pm #

    I have a question about the duration of the group. I have tried setting up the product in woocommerce the way it’s described in the video however I have no option to determine the duration of the group.

    • kento March 9, 2013 at 9:44 pm #

      Hi Will, what plugins and versions are you using please?

      • Will March 11, 2013 at 4:15 am #

        Running Groups v 1.3.8, Groups Woocommerce 1.3.4, Woocommerce v 2.0.2 thanks.

  14. jaybe March 8, 2013 at 9:15 pm #

    Using the API/PHP, how could one obtain a list of all the Groups available? (not via shortcode… as the shortcode return is styled and filthy for processing). Thanks

    • kento March 19, 2013 at 9:00 am #

      Have a look at how the [groups_groups] shortcode is implemented in groups/lib/views/class-groups-shortcodes.php – you will also see that there are options you can use for what markup is generated without having to reimplement the thing yourself.

  15. Marc March 7, 2013 at 9:32 am #

    Are you aware of problems with W3 Total Cache ?

    After I installed it, users were not longer automatically added to the group ‘registered’. Adding them manually worked.

    Had to disable Total Cache to let it work again.

    • kento March 9, 2013 at 12:00 pm #

      Hi Marc,
      Hmmmm … I’ll have a look, any other plugins that might interfere?

  16. jaybe March 4, 2013 at 8:04 pm #

    Using the API/PHP, how could one obtain a list of all the Groups available?
    Figured out how to list a user’s Groups… but I’d like to obtain a list of all available and or a subset thereof.
    Thanks

    • kento March 9, 2013 at 11:50 am #

      Please see the implementation of the [groups_groups] shortcode (explained under Shortcodes).

  17. jaybe March 1, 2013 at 1:28 am #

    Is it possible to cause the current page to refresh, and or redirect to a particular page, upon a user joining/leaving a group via Groups’ join_group short code, for example?

    Scenario: user is on a “Subscription” page that provides ability to join/leave Groups. Also on that page are a list of post protected/visible/invisible by various Group memberships. Upon joining/leaving, I’d like the page/posts/visibilities to refresh, along with the current status of the Groups join/leave button/text, so the user gets an updated/current view after the subscription modification.

    Thanks!

    • antonio March 1, 2013 at 12:02 pm #

      Hi,
      shortcodes not accept redirects, you can redirect using javascript. Here an example: http://pagebin.com/aM4bv9GI
      Be careful with the order of shortcodes.

      cheers

      • jaybe March 1, 2013 at 3:17 pm #

        Thanks for reply. Would you expound a bit about being careful with the order of short codes? Why? What are the implications and how does that work? Also – I noticed inconsistency in the behavior of Groups. For example, after clicking “leave group”, immediately following, the “join group” button appears and is available. However, after clicking “join group”, the “leave group” button is NOT presented; that’s inconsistent. Is this an ordering issue? I feel like I would need more control of actions after join/leave in order to take advantage of such powerful functionality.

        • kento March 1, 2013 at 4:26 pm #

          What he refers to is due to the shortcodes that handle adding and removing the user from the group, are acting at the very same place they are placed at. If you have a protected block before a button that allows the user to leave and another protected block after that, when the user presses the button, the content of the first block will still be shown, while the block after the button will not reveal its content. That is because when the first block is rendered, the user still belongs to the group, while in the second block the user has been removed from the group. That’s not an inconsistency but simply following the logic in a sequential execution of shortcode blocks.
          The same reasoning applies to the buttons, them showing or not just is strictly following whether the user belongs to a group when the button is rendered or not.

          • jaybe March 1, 2013 at 5:00 pm #

            Makes sense; thanks for the clarification. As a result, it sounds like I need to perhaps not be leveraging short codes, and instead directly dealing with Groups at the API/PHP level in templates, plugins, etc.? I presume that might give me more control and perhaps stability over time versus using short codes in posts and pages. Are there examples of how to leverage the API to perform common functions such as adding/removing users to/from Groups, then refreshing and or redirecting? … common flows, etc.?

            Really appreciate and am excited about the work you’re doing and the possibilities of Groups.

            • kento March 5, 2013 at 10:21 pm #

              Using the API is more flexible of course, it really depends on how fine-tuned you want to have your user experience. The API documentation is lacking examples on how basic use cases are implemented (I know that should be remedied at some point, but I haven’t had a chance to take care of that myself up to now), although a look at the code itself reveals well documented methods that can be used. There are also several examples here in the comments (hint: search for :: ).

              By the way, I can’t express enough how welcome I find comments like yours. I very much appreciate the interest people take in using Groups and other plugins that I maintain in order to apply them to fit their scenarios 🙂

          • jaybe March 4, 2013 at 5:32 pm #

            Understood; thanks.

            How would I go about creating an interface whereby when the user joins or leaves a group, the page is refreshed, as well as the button/join/leave status?

            Example: I want to use Groups along with the join/leave buttons to provide an interface whereby users can enable/disable visibility of posts based on Groups as “categories” for content in relative near-time.

            When the user clicks to join the “See Posts: A” Group… the page is refreshed, including posts visible to “See Posts: A” Group, while also updating the button so they could easily leave/hide the group/posts in one click.

            Make sense? Thoughts? Neat stuff!

            • kento March 9, 2013 at 11:44 am #

              That sounds tricky 🙂 Do you have any existing code where you want to integrate this? GitHub?

  18. jaybe February 28, 2013 at 2:32 am #

    I noticed an issue whereby contextual content is provided and leaked in page source despite target content being assigned to a private Group.

    Specifically, for example, on a page set as the “Home” page, the following is in the page source, revealing the previous post link URL and Title:

    The “Friends Only Post” is set as read only to the “Friends” Group, yet that is included in the page source of the following post/ID.

    I presume this is likely a “WordPress” issue, however, protected content and information is being leaked. I wanted to share this to make you aware and hopefully find a way to protect and work around it.

    Please let me know if you need more information.

    • jaybe February 28, 2013 at 2:35 am #

      Again, clarifying:

      [link rel=’prev’ title=’Friends Only Post’ href=’https://domsin.net/friends-only-post/’ /]

    • kento March 1, 2013 at 4:18 pm #

      It’s not necessarily a leak in every use case. In one scenario you might want to show it, in another you don’t. This would also depend on whether the theme is actively hiding links to protected posts or not.

      If you wanted to be sure that all links to protected posts are hidden, you would use the API that Groups provides, for example as mentioned here.

  19. mitchell360 February 27, 2013 at 7:57 pm #

    Karim (@kento),

    Looking to be pointed in the correct direction to contribute.

    I am thinking about contributing to the plugin so that permissions are set at three levels:
    – see post/page in list
    – see excerpt
    – see the_content

    This way, we can do things such as: if you can see in a list, but cannot see excerpt or the_content, add a class with a lock icon.

    This is also important for our use of Groups as we have some custom post types which are essentially protected downloads. Right now, groups filters the post out of existence. We just want to filter the download action based on group/caps/roles.

    Can you help architect/design the approach? I want to make sure that we do it in line with your existing architecture vs. hack it.

    My current thinking is to:
    1. modify class-groups-post-access.php
    2. change user_can_read_post to user_can_see_post (since all of the current logic makes the post non-existent)
    3. create user_can_read_excerpt and apply filter appropriately
    4. create user_can_read_the_content and apply filter appropriately
    5. modify the code that provides metaboxes on posts/pages for these three “levels”

    Am I missing anything significant?

    • kento March 1, 2013 at 3:55 pm #

      Thanks for the suggestions, I know that some of what you mention would certainly be welcome – I’ve been asked if features like that would be possible within or as an addition to Groups.

      Before being able to recommend on or evaluate it, I need to have a thorough look at what you’re suggesting and the impact as well as requirements that would have within Groups.

      If you are already working on modifications, can you please co the current trunk from the wordpress.org Subversion repository so patches can be generated? It’ll be easier to review the modifications for me that way (I haven’t had time to create a repository on GitHub for Groups yet, but we can equally coordinate on good ‘old’ Subversion).

    • Thomas Clausen September 11, 2014 at 3:40 pm #

      I really miss the opportunity to tease posts as well. Showing the title, the excerpt, the thumbnail. And when I click this from an archive listing, I would be prompted to log in, or buy a membership.

  20. Kirk Wight February 26, 2013 at 7:17 pm #

    I’m having a pagination problem, which may be related to what other above have mentioned (whether they realized it or not).

    The number of post returned per page seems to be based on total number of posts, not the total number a user can see, throwing off the pagination. If “Settings > Reading > Blog pages show at most” is set to 10 posts, and the first ten posts returned by the query are not viewable by the user, then a blank page will be displayed. If posts 11-13 are viewable, however, http://mysite.com/page/2/ will show them. Likewise, if pagination is set at 10 posts, and 3 posts are not viewable to the user (restricted by Groups), that user will only see 7 posts for that page (rather than the first 10 viewable posts).

    Any ideas for a fix?

    • kento March 1, 2013 at 3:40 pm #

      Thanks for explaining that Kirk, I’ll need to review things to see what causes it.

  21. alex v February 25, 2013 at 5:52 pm #

    Hey there,
    I would like to create widgets in the dashboard, or on the front end, for logged-in users to see what content they have access to. I don’t see an apparent way to do this. I’m using Groups + Jigoshop. So I’m curious what the best way to achieve this is.

    • kento February 28, 2013 at 2:43 pm #

      Hi Alex,
      If you’re using for example a list of links to posts as in an archive template, it would automatically show the ones the user has access to. Have you tried that?

      • alex v February 28, 2013 at 5:27 pm #

        Hey Kento,
        No, I haven’t tried that, but it sounds intriguing. If I were to use an archive template, though, it would show all posts, not just what they have access to. Right? Essentially, if I were to go that route, I’d only want the posts shown that they have a group membership assignment to access.

        • kento March 1, 2013 at 4:29 pm #

          If you use WordPress functions to query the posts, then they will be filtered through the functions defined in Groups_Post_Access. You would get an unfiltered list if you were to bypass these, for example by querying the database directly.

          • alex v March 1, 2013 at 5:18 pm #

            Hey Kento,
            Thanks again for the reply. Is there any sort of documentation as to the functions and parameters i can use via your groups plugin? This seems like it would be straight forward, but is a little beyond my understanding. having reference material would be a big help. =)

            • kento March 5, 2013 at 10:36 pm #

              The Codex often offers good examples for commonly used functions, for example get_posts would be a good start 🙂

  22. Joey February 24, 2013 at 7:34 am #

    Great plugin. Thanks!

    Is there a way to set the default groups for all new posts?

    I allow certain clients to create posts. I don’t want the clients to see all of the access restrictions options when adding a post. Instead, I’d like the restrictions to be automatically set for all new posts. I can then hide the meta box in the Add New Post screen.

    Thanks.

    • antonio February 25, 2013 at 8:59 am #

      Hi Joey,

      you can setup in Groups->Options the Capabilities that you want show in posts.
      And show only the desired Capability.

      cheers

      • jaybe March 1, 2013 at 5:12 pm #

        I believe something different is being asked.

        Restated: Is there to set /default/ Group(s) read/access restriction, automatically, for new posts/pages?

        e.g. Upon creation of any/every new post/page, the post/page is /automatically/ set as read restricted to Groups: A, B, and D, … without user/author intervention.

        *The point here is to /ensure/ newly-created content by non-savvy authors/publishers aren’t published as “public”, and are instead published and restricted by the proposed defined Groups’ defaults.

        • antonio March 2, 2013 at 7:37 am #

          Sorry,
          You can’t set default restrictions automatically for new posts/pages. You can do it using “Access restrictions” checkbox and/or shortcodes.

          cheers

  23. Eric Adams February 22, 2013 at 8:31 pm #

    Awesome plugin – so glad I finally purchased it!! I do have a couple questions…

    1) I can get the plugin to work fine using the in-page shortcodes to show/hide content to the correct group (members, non-members). However, as soon as I use the <!–nextpage–> shortcode, the whole thing stops working and the page is no longer protected. Aside from actually breaking the page up into multiple pages, is there any way to fix this?

    I sell tutorials, and one of my tutorial pages is over 5,000 words and 19 sections long so far – I really don’t want to break this up into different pages.

    Using shortcodes, it was my hope I could have a non-member section that showed the item they need to purchase to view the page – this would be essentially like a targeted 404… Since the <!–nextpage–> shortcode is breaking my page, I resorted to the 404 page.

    2) I’ve see a ton of people comment on the 404 issue. I do have the Groups 404 Redirect plugin installed and have it pointed to a specific post. However, (like several others have mentioned previously) I’d love the ability to specify a particular destination page, depending on which group the user tried to access. I’m selling tutorials, and if a customer clicked on “Tutorial C”, I’d like to take the customer to a product page selling “Tutorial C”, not a generic shop page that shows anything and everything else available on my website.

    • antonio February 25, 2013 at 6:37 pm #

      Hi Eric,

      If you use <!–nextpage–>, you must restrict access with capabilities. With shortcodes you can’t do it.
      By example:
      capability: Premium
      Group: Premium
      in Groups->options: check Premium to show in posts
      And in the post, check restriction Premium.

      With Groups 404 Redirect you only can redirect to a page independently from the group.

      cheers

  24. Takis February 21, 2013 at 2:36 pm #

    Hi,

    has anyone been using Affiliates Pro on a Multilingual environment?

    I am using WPML on my site and just about to try it.

    Are there any known issues or anything else that I should know?

    Many thanks in advance.

  25. Tobias Fransson February 21, 2013 at 7:17 am #

    Hi Kento,

    I am using Groups with Woocommerce Groups and I am trying to use groups to work with Simple Press in order to sell a product (a group level) and automatically give access to the respective “product forum” in simple press.

    Although Simple Press integrates with WP User roles this isn’t ideal for me as I will be doing a lot of products and I would need to create 1 WP role per every possible combination of products making things un-manageable.

    Someone on the simple press forum suggested that when a customer buys my product a custom user meta field could be added and that would work with simple press.

    I’m not a programmer and the conversation over at simple press support forum is now way over my skillset.

    I would like to be able to get groups to work with simple press in a way that doesn’t involve using WP user roles so that I can stack the access levels.

    Ex. setup product 1 by using groups and in Simple Press setting it up to match a forum. When the user then buys product two he gets that extra access level added to him rather then moving from one wp user role to another.

    Is this something that groups support or does this need to be developed?

    The obvious benefit here is that simple press is widely used and the only “real” WordPress native forum alternative to bbPress etc. and I really think getting groups to intregrate with simple press will be highly useful and appreciated in the wordpress community.

    • kento February 21, 2013 at 11:31 am #

      It seems you haven’t noticed Groups Forums yet 🙂

      It leverages the facilities provided by WordPress and is light-weight. In fact, I’m preparing a post with a performance comparison between Groups Forums and bbPress … so much I can already tell, there’s a considerable difference in performance (in favor of Groups Forums).

      • Tobias Fransson February 21, 2013 at 5:53 pm #

        I am looking for something more advanced then Groups Forum, bbPress is also more of a bulletin board then a forum and not what I am looking for.

        Group Forums has potential but needs to be developed way more for my purposes vs simple press that has 90% of what I am looking for but I am not sure how to get simple press to recognise groups access control.

        What would it take to get Groups to integrate with Simple press without using WP roles?

        • kento February 22, 2013 at 1:02 pm #

          It surely depends on what you’re looking for, whatever seems to match what you need more, should of course be a closer choice.

          After doing the tests yesterday with Simple:Press, which to me looks like a completely independent system that does not intend to leverage WordPress’ features, I would say it would be rather difficult to integrate it with Groups.

          Taking into account that it also has a huge performance impact, I simply don’t think it would be worth the effort of trying to make it work with Groups. Simple:Press creates 19 new tables in the database and even uses its own table for forum posts instead of taking advantage of WordPress’ facilities for that. Groups is integrated with WordPress’ facilities, making it work with a system like Simple:Press that is basically mounted on top of WordPress and does its own thing, just doesn’t look like a good idea to me … please note that I’m trying to answer your question about roles based on problems I suspect and without entering into technical detail 😉

  26. Isaac Savage February 20, 2013 at 1:19 pm #

    Hi Kento,
    Can you tell me the best way to import a list of WP users from a CSV file,and also place them into one or more groups ?
    Thanks,
    IS

    • kento February 20, 2013 at 9:34 pm #

      Hi Isaac,
      Do you need to apply criteria to assign those users to one or more groups? Assuming you do an import, all users will be added as members of the Registered group when their user accounts are created, would that be sufficient?

      • Isaac Savage March 4, 2013 at 5:38 pm #

        Hi Kento,

        No. That wouldn’t be sufficient.

        Yes. I’d like to include them in one or more groups, and have it import them as “Users” that are already assigned to the correct group(s).

        • kento March 9, 2013 at 11:47 am #

          Then the best way I can imagine is to use an existing CSV import plugin and derive something from it, if you have the group membership information along with each entry, it should be fairly easy to do.

  27. Matthew February 16, 2013 at 8:04 pm #

    Great work! How would go about translating the plugin into french?

    • kento February 18, 2013 at 11:31 pm #

      That would be awesome Matthew, do you know how to translate plugins in general? If yes, please use the .pot translation template for the latest version or if you need help just get in touch 🙂

  28. Nico February 16, 2013 at 10:32 am #

    Hello,

    Thanks for this plugin, it’s awesome!

    How to programmatically add a user to a group?

  29. Victoria February 15, 2013 at 8:28 pm #

    kento,
    1.how can i set up a registration page with fields such as name, email, city, etc?
    2. how can i assign users to the different groups? they are already created.

    regards

    • kento February 18, 2013 at 11:11 pm #

      Hey Victoria,
      For #1 you’re probably looking for something like the Profile Builder plugin provides, see http://www.itthinx.com/useful-plugins/ please.
      On #2 you just go to the Users section and you’ll find the assignment facilities on top of the table – check the checkbox for a user and select the appropriate group, then hit Add.

  30. Jan February 15, 2013 at 2:21 am #

    Hi
    your groups plugin I have because of Woocomerce and their subscriptions (and your simple but logical ability to have one subscriber subscribe to more than one group – yipppeee, THANK YOU)
    I just want to vote for mass emailing a specific group when I release a new lot of posts – it is a ‘little’ thing of no real issue to many, but I would love it to email subscribers about new magazine issue
    Thanks so much for the grand work you

    • kento February 15, 2013 at 12:11 pm #

      Hi Jan,

      Many thanks for your voice on the group-email feature, I’m sure it would be a welcome addition to Groups. It would be quite simple to create a basic plugin that lets you email a specific group, although a good solution would allow group members to subscribe (or not) to those emails. Users should be able to decide whether they want to receive those emails, otherwise those who don’t want to receive them would just consider them spam. There should probably also be a way of archiving the emails that have been sent, a choice on message format (plain or HTML), maybe templates … thinking about it, this would be eventually be a newsletter system based on Groups 😉 Or an integration with an existing solid newsletter plugin.

      I’d love to hear opinions on that and if you or someone else wants to suggest an integration with an existing plugin, it’s of course welcome.

  31. Victoria February 14, 2013 at 2:39 pm #

    I am building a site for which I need to kinds of memberships: one is free (just sing up needed) and the other one is a paid suscription.
    the members of the free suscription can have access to restricted content in pages A, B C.
    the members of the paid one should have access to the restricted content (pages A, B C)+ a video page (its an elearning course that im selling.
    can i do that with your plugin?

    in addition to this i need to use MERCADO PAGO gateway. I purchased a plugin to use MERCADO PAGO with woo commerce and it works great, but i dont know if this plugin will work with yours. what do you think? i can send you this plugin in case you wanna see it.

    can you help me? my purchase relies on these two features.

    regards,

    victoria

    • kento February 14, 2013 at 10:15 pm #

      Do you need it to be a subscription with recurring payments or is a limited (by time) membership an option? If you don’t need recurring payments, then any payment gateway is supported with Groups WooCommerce. If you do need recurring payments to maintain memberships, then it must be a gateway that is supported by WooCommerce’s Subscriptions plugin. In the latter case, I would recommend you to ask on WooThemes if that gateway is supported, if it’s not, at least there is some feedback that there is interest for it 🙂

      • Victoria February 15, 2013 at 4:05 pm #

        thanks for your prompt reply. i just need one payment. the MERCADOPAGO gateway plugin for woocommerce is actually working with woocommerce, so it would work with your plugin then?

        what about the 2 kinds of memberships i told you about? can i have one free membership with access to some stuff and a paid one with full access?

        do you have a money back guarantee?

        regards.

        • kento February 18, 2013 at 11:01 pm #

          Thanks Victoria, for the free membership it would be sufficient when a user signs up or a customer places an order. They would belong to the Registered group automatically and you can grant access to content based on capabilities assigned to that group.
          Basically any payment processor will work with normal non-subscription but either unrestricted or time-limited memberships based on Groups WooCommerce. If you want real subscriptions, it will need to be a payment processor that is supported by WooCommerce Subscriptions.
          As these extensions are sold through WooThemes, please refer to the current terms and conditions of sale there.

  32. jon February 14, 2013 at 11:17 am #

    Hi, is there any way of being able to have the user select a group from a drop down menu on the wordpress site? preferably at registration?
    Cheers

  33. Travis Ballard February 11, 2013 at 9:52 pm #

    I’m building a site for a client and everything is working great on my dev server but after moving live I’m experiencing some weird 500 internal server errors so I contacted HostGator about some error logs and they came back telling me that the problem was with the Groups plugin and that when disabled the site would start responding again. The error that was logged is as follows:

    [Mon Feb 11 14:22:43 2013] [error] [client 74.202.255.243] Premature end of script headers: index.php, referer: http://vpmarketingondemand.com/wp-admin/post.php?post=910&action=edit

    Oddly it happens mostly on Safari/Chrome but I have reproduced it in FireFox also. It’s happening when we edit a page and then click on ‘View Page’ within the update notice after clicking save.

    Any ideas on how to fix this? I’m lost here ;/

    • kento February 12, 2013 at 11:41 am #

      I don’t see where this would be related to Groups to be honest. An internal server error is just that, have you checked your .htaccess?

      • Travis Ballard February 12, 2013 at 1:26 pm #

        Nothing in it but the standard WordPress snippet

        • kento February 14, 2013 at 10:52 am #

          Did they mention any specific reasoning?

          • Travis Ballard February 14, 2013 at 2:03 pm #

            No they did not though I did remove a hook I added in for discounts to be applied to the groups and the 500 error has stopped so I would guess that it was with that function and not Groups after-all.

            Maybe you can help me with this though because I’m stuck on it and would really like to be able to move forward, lol.

            The snippet that causes the 500 is here https://gist.github.com/TravisBallard/4770528 (in functions.php) any ideas on another way to do this? Basically we have 3 groups… bronze, silver, and gold. bronze users get a 10% discount, silver gets 15%, and gold 20%.

            Thanks,
            Travis Ballard

            • kento February 14, 2013 at 10:09 pm #

              I would enable debugging options in wp-config.php and take a look at wp-content/debug.log to see what happens. Just the 500 is too little info 😉

  34. Dan February 11, 2013 at 3:37 am #

    Hi kento,
    Using Groups after it was recommended to me on Google+. Liking it but for one problem with a WooCommerce install that’s not playing nice – but I’m not sure if it’s by design.

    The objective is to hide the WooCommerce shop from public view, and make it available only to authorised (logged in) users (however this is not a subscription based membership.)

    I have everything setup as it needs to be – groups, capabilities, enforce read access, and having tested it, everything works – except for whichever page is designated in WooCommerce as the shop’s base page – that will appear regardless of access restrictions

    Can you help? Is there something in the setup I’ve missed? Is there an “override” in WooCommerce I can remove?

    Many thanks!

    • kento February 12, 2013 at 11:38 am #

      That’s an interesting question Dan, I thought it worth the while to write up a micro-tutorial 😉 on that.

      • Dan February 13, 2013 at 2:34 am #

        kento,
        That sir, is awesomesauce in a blog post!

        Thank you so much! I’ll be sharing that over on G+

        • kento February 14, 2013 at 11:26 am #

          Thanks a bunch Dan 🙂

  35. Eric Platt February 4, 2013 at 9:39 pm #

    I have installed a plugin called “Private Messages For WordPress” that allows “emails” to be sent to members on the site. However I need to be able to send them to a group or groups. Any ideas how this might be accomplished? Is there another plugin that might help create that function?

    Thanks

    • Eric Platt February 4, 2013 at 9:48 pm #

      Just to be clear: they aren’t really emails, they are just private messages that appear in the “Inbox” of the other user created by the Private Messages plugin.

      • kento February 5, 2013 at 8:47 pm #

        That would really require an integration with the plugin you mention, AFAIK such an integration doesn’t exist – hopefully I’m wrong 😉

  36. perceval84 February 4, 2013 at 9:22 am #

    Hi,
    I’m experiencing a problem with navigation links and posts per page.

    It seems the links “older entries” and “previous entries” are built before the filter on capabilities is executed, when the loop has already done its job.

    Also after the last release, for me the problem it’s still there.

    Whether I use a plugin for page numbers, or the standard wordpress pagination, the number of posts listed in pages still changes if I activate Groups.

    Maybe I’m wrong, but it seems Groups keeps filtering (and reducing) the post array only after the pagination is prepared…

    Thanks for the help…

    • kento February 12, 2013 at 11:45 am #

      Can you give access to the site to have a look?

  37. janpolsen February 3, 2013 at 4:18 pm #

    Is there a way to get an array of capabilities for a given user?

    I had hoped for something like:
    $user = new Groups_User( $current_user->ID );
    $caps = $user->capabilities;

    • kento February 5, 2013 at 5:27 pm #

      Yes, that will result in an array of Groups_Capability.

      • Jan Olsen February 10, 2013 at 8:04 pm #

        Does your email notification work? If it does then I must have missed your reply :(…

        Anyways…

        global $current_user;
        $user = new Groups_User($current_user->ID);
        $caps = $user->capabilities;
        var_dump($caps);

        … just results in NULL, while I would assume (according to your reply) that it should return an array with the capabilities assigned to the groups the current user is a member of.

        I am running the above script through the “Insert PHP”-plugin – could that be the problem?

        • kento February 12, 2013 at 11:04 am #

          Here’s an example of how to retrieve the capabilities for the groups the user belongs to:

          global $current_user;
          $user = new Groups_User( $current_user->ID );
          $groups = $user->groups;
          foreach( $groups as $group ) {
          $caps = $group->capabilities;
          echo var_export( $caps, true );
          }

          You can run that through Insert PHP, too.

  38. Aaron January 31, 2013 at 12:31 pm #

    Hello Kento,

    I am attempting to do something with your plugin that it’s designed intentionally not to do. Let me explain, and maybe you’ll be able to help a little 🙂 …

    I am using woo commerce, groups, groups for woo commerce, and subscriptions and am attempting to provide support for 3 months to every client that purchases a software product of mine.

    The catch is, that I am running the support site on a subdomain of the ecommerce domain. It is a multisite network, and I run woocommerce on the root domain. I have my support setup to be on support.rootdomain.com

    I am using “multisite User Management” in order to assign roles to customers for all of my subdomains, including the support subdomain. This works out perfectly.

    I have created a product, mandated that the customer register for the site in order to complete the purchase, and have assigned that customer a 3 month subscription to a group I’ve called support. This works perfectly.

    I have then setup the necessary capabilities for that group, on every domain, to be able to view the content on that domain if I want them to.

    I modified your plugin slightly. I didn’t actually add anything, I just strategically removed the parts of the plugin that assign the “registered” group to all users, renamed it “support” and then changed the code in the groups for woocommerce extension to enable “Support” group to be chosen as a group to assign via a product purchase.

    So, now everything works perfectly for me, except… After a user purchases a product, and is signed up to the group, if he tries to go to the support subdomain and view the restricted content, he is unable to do so. The groups are still independent on a site by site basis. You made it very clear in your code base that that was your intention.

    So since the groups are housed in different tables, and capabilities are housed in different tables, all on a site by site basis, even though I am registering the exact same group on every site, and the user is signed up to the same group name on the main site, he isn’t able to view the restricted content on the sub-sites.

    Do you think you might be able to help me achieve this? I have gotten pretty far with it, but beyond this, it’s a little out of my comprehension. I would be more than happy to submit a resolution to this problem to woocommerce as well, or you could even repackage it and sell it, whatever you would like. I just think the ability for a customer to move from site to site and still be able to see the content restricted by one group would be fantastic!

    Please let me know what you think, I have subscribed to your comments, so I will receive a notification when you reply. Hope you are well, and thankyou for such an awesome plugin.

    -Aaron

    • kento February 11, 2013 at 1:34 pm #

      Hi Aaron,

      I had your comment marked for review and finally got to read through it 😉

      Regarding the cross-blog-access-restriction, I would suggest using the groups_user_can filter. Implement a filter where you could simply switch to the main blog, check if the user has the required capability or just belongs to the support group and switch back to the original blog to return the appropriate value. The filter is called in the Groups_User::can( $capability ) method (see class-groups-user.php) and takes three parameters. I would pack the code in a little plugin which you could install on the support blog (I don’t see the need to network-activate that).

      What I don’t understand is the modifications you have done, I assume you’re aware of the inconveniences of hacking the plugins themselves and that you really shouldn’t do it, that aside, if you just want the users to belong to the Support group, why don’t you simply create that group and assign it on the products that should grant access to it? If you’re using the Registered group, anyone would belong to that group anyway. Or am I missing something here?

      Cheers

  39. Cathlene Bollin January 31, 2013 at 5:47 am #

    I found a question like mine. http://wordpress.org/support/topic/fatal-error-after-activating-1?replies=5

    QUESTION by Jabka
    When I activate the plugin I get this error message:
    Fatal error: Call to undefined function wp_get_current_user() in /var/www/web94/html/wplms/wp-includes/user.php on line 209
    I’m running the latest WP version and the only other plugins I have activated are woothemes-sensei, woothemes-updater and Akismet.
    Anyone knows what’s wrong here?
    http://wordpress.org/extend/plugins/groups/

    ANSWER by John
    Yes, Groups is conflicting with WooTheme Sensei. WooThemes is aware of the solution and said that they are working on a solution with the Groups author.

    I’ve got a ticket open with WooThemes support, trying to get an idea of what the time line on the fix will be. I’m dead in the water with the project until either Groups or Sensei is fixed and updated.

    • kento January 31, 2013 at 5:14 pm #

      It seems the issue has been resolved with Sensei 1.0.4.

      • Cathlene Bollin January 31, 2013 at 6:01 pm #

        RESOLVED! Thank you Kento. The WooThemes Sensei update fixed it.

        I have both Sensei and Groups successfully installed and activated in WordPress.

        You are doing an amazing job keeping up with everything – WOW! You deserve a big HUG!

        • kento January 31, 2013 at 7:56 pm #

          Thanks Cathlene but the guys at WooThemes were actually quicker, I just hadn’t noticed the new release was already available 😉

          • PaulMighty January 21, 2014 at 1:27 am #

            I am seeing a conflict between Sensei and Groups again. Running WP 3.8, Sensei 1.4.7 and Groups 1.4.6. I have “Front page” set to a default page in Reading Settings, which produces this warning on the Front page:

            Notice: Undefined property: WP_Query::$post in [website]/wp-includes/query.php on line 3296

            Notice: Trying to get property of non-object in [website]/wp-includes/query.php on line 3671

            Notice: Trying to get property of non-object in [website]/wp-includes/query.php on line 3673

            Notice: Trying to get property of non-object in [website]/wp-includes/query.php on line 3675

            -PaulMighty

            • kento January 21, 2014 at 4:15 pm #

              Hi,

              I don’t see anything related to Groups in the notices. Besides the notices, is there any behavior on the page that is different from what would be expected?

          • PaulMighty January 21, 2014 at 6:53 pm #

            Kento, I am not seeing anything else behaving strangely, just those notices. I’m running a clean install of the Bones starter theme with only Groups and Sensei activated. The notices only appear if both are activated, deactivating either one removes the notices. Not sure how to troubleshoot based on the output :/

            -PaulMighty

            • kento January 29, 2014 at 1:25 pm #

              I would start with the usual, disable all plugins and use a ‘standard’ theme like Twenty *, then enable other plugins individually until these show up. That would help to identify what’s causing the notices.

  40. Cathlene Bollin January 30, 2013 at 8:09 pm #

    I must say Kento, I am impressed and amazed reading your replies to all these comments. I don’t understand why the stats for the plugin show only 6 of 23 resolved. It looks to me you’ve given 100% response.

    When I installed Groups plugin via wordpress, it crashed both my website and wp-admin. No access: error – configured incorrectly. It has given me several different messages:

    The website encountered an error while retrieving http://www.cathlenebollin.com/wp-admin/plugins.php?activate=true&plugin_status=all&paged=1&s=. It may be down for maintenance or configured incorrectly.

    The website encountered an error while retrieving http://www.cathlenebollin.com/wp-admin/plugins.php?action=activate&plugin=groups%2Fgroups.php&_wpnonce=98179f7bc4. It may be down for maintenance or configured incorrectly.

    Here is what I did:
    Initial install of Groups plugin crashed website and wp-admin.
    Renamed Groups folder thru cPanel file manager.
    Website and wp-admin back.

    Install Groups plugin, install went fine this time, crash during activate.
    I renamed Groups folder, etc – same thing three tries.

    Idea from a post here: conflict with another plugin.
    I deactivated my only other active plugin Sensei.

    Groups plugin installed and Activated – all ok.

    Activated Sensei plugin and crash again during activate.
    Renamed Groups folder like before.
    Access to website and wp-admin ok again.

    Groups plugin installs and activates fine by itself.
    Sensei plugin installs and activates fine by itself.

    Website and wp-admin both crash, deny access, say configured incorrectly when I try to have both plugins active.

    The reason I got Groups is Sensei documentation said I need it so I can allow access to specific pages (coaching sessions and homework) via login by my clients.

    Groups, Sensei and WordPress documentation all talk about both plugins working together.

    Any idea what is causing it to crash on me?
    Thank you Kento.

    • kento January 31, 2013 at 2:01 pm #

      Many thanks Cathlene, I suppose you’re referring to those on wordpress.org, these are not synced with the responses given here although I’m trying to attend to them regularly as well. Trying to keep up with all is daunting sometimes though, but I certainly appreciate all the feedback that is provided 🙂
      I’ve proposed a fix for the issue and hope that during the next days you will find it solved.

  41. Luke January 29, 2013 at 11:53 am #

    Thanks for this great plugin. I have set up Groups in conjunction with WooCommerce in the hopes of selling a premium membership. More particularly this is being done on a single page basis, so I was hoping to there would be some way to reveal a link through to this page in the order email they receive.

    I guess this would be available one way or another through the customising the email templates. Do you know of any easy way to debug these? Some way to faux trigger this being sent?

    • kento January 31, 2013 at 1:16 pm #

      Wouldn’t the Purchase Note option on products be ideal to place a link to the page?

  42. BRENOT January 28, 2013 at 1:38 pm #

    Try to install Groups for wordpress with Groups woo commerce and seinsei plugin
    But i have this bug !!!
    fatal error: Call to undefined function wp_get_current_user() in /home/…/wp-includes/user.php on line 209
    Can you please send me as soon as possible the solution

    Thank you

    • kento January 31, 2013 at 12:59 pm #

      Thanks we’re aware of the conflict and a solution is being prepared.

  43. Dennis Foreman January 26, 2013 at 4:24 pm #

    On this page that we are on right now.
    http://www.itthinx.com/plugins/groups/
    In the section
    Content visibility for members and non-members
    [groups_member group=”Registered”]
    Has the wrong type of quotes.
    As well as other examples here.
    New user’s copy from these examples and they don’t work because the quotes are wrong.
    Can you update this page to have the correct quotes?
    Just trying to save others time tracking it down.
    It gave me fits…. 🙂

    • kento January 31, 2013 at 12:34 pm #

      Thanks for pointing that out Dennis, another one that managed to slip through 🙂 Fixed it.

  44. PAscal Genest January 26, 2013 at 6:17 am #

    Group plugin not compatible with ‘woothemes -> sensei plugin’ . When we activate those two plugins, we’got this fatal error: Call to undefined function wp_get_current_user() in /home/…/wp-includes/user.php on line 209, both on front and back end.

    I have to delete de ‘group’ plugin folder via FTP to be able to get wordpress work again.

    I’have tested it on a fresh install wordpress 3.5.1, without any other plugin installed.

    Thanks to fix that bog, I’m gonna post the same message on woothemes website.

  45. John January 25, 2013 at 4:23 am #

    Hi Kento – I have Groups, Groups for WooCommerce, Woo Subscriptions and the PayPayl Digital Download Extensions installed.

    I have a membership site. One month for $19.95 recurring.

    I have one Group which is Premium. Everything works great. Once an order is placed, under Users I see the following:
    Role=Subscriber
    Groups=Registered and Premium

    Once a member Cancels or Suspends an order (Which by the way, this idea to give the customer the ability to Suspend or Cancel on their own is asinine!), the User’s setting change to this:
    Role=Customer
    Groups=Registered and Premium

    So the only thing WooSubscriptions did was to change the Role from Subscriber to Customer. This change in no way prevents the member from still getting access to my content (Those pages that have a privilege set to Premium) because the Groups do not change.

    Do you have any suggestions on how I can prevent access to view those pages which have Premium privileges once the Role gets changed from Subscriber to Customer?

    I’d really appreciate your help.

    Thank you

    John

    • kento January 28, 2013 at 1:54 pm #

      Hi John,
      When a subscription is cancelled, it doesn’t imply that the user must be removed from a group immediately. The user is removed when the period that has been paid for is over. For example, X orders a monthly subscription and gets access to a premium group while the subscription lasts. During the first month, X cancels the subscription (very rightfully they should be allowed to cancel their subscription by themselves, otherwise the seller could have the chance to ‘never let go’ of a client). X still has paid for the first month and should be granted access to the premium group during that month. As the subscription is cancelled, after the first month is over, the user will be removed from the premium group. Note that this is not the same as a refund, with a refund the user will be removed from the group immediately.
      Cheers

      • John February 1, 2013 at 4:07 pm #

        Hi Kento,

        Thank you. I want to apologize for using the word asinine in my previous question. After further reading, I now realize why the option to allow customers to suspend or cancel their subscription is there. However I still would prefer to choose whether or not a customer has that choice. I know realize that regardless if the customer is given these options from a sellers web site, the buyer can still go into their own PayPal account and cancel or suspend from there. Something no one ever talks about. I’ve been in contact with the dev of subscriptions for woo and it looks like giving the seller control over how many times the buyer can suspend or whether or not they can cancel at all my be forthcoming.

        After reading your reply, I see now that if I “Refund” an order, the customer is automatically removed from the Premium group. I was not aware that by canceling an order, the customer would automatically be removed after the trial period is over. That’s great.

        My only question then is the Suspend option. If a customer or I Suspend a subscription, it suspends the account from being billed. But that too should prevent them from accessing my content. The problem with allowing a customer to Suspend, is that they can Suspend the account then reactivate once the next billing date has past. In a sense, keeping the subscription perpetually going without having to pay. The customer could Suspend the account a day before his next billing date, then re-activate the account after that billing date has past.

        Since it’s so rare that a customer would want to suspend, I’d prefer to have the customer contact us, allow us to put the account On Hold or Suspend which will then prevent them from accessing the content until they are in active status again. However, I see how that can be a nightmare since the subscription extension would then have to keep track of exactly how many days he’s had access to our content. Right now it bills exactly every 30 days.

        My question is then this… is it possible to have an account that is put On Hold or Suspended to automatically be removed from the Premium Group? Or would you suggest that we manually remove the user from the group ourselves? A perfect example is that someone paid using a stolen PayPal account or credit card. In a case like this, PayPal suggests not to refund anything as a chargeback is automatically processed on PayPals end. If we refund the customer, we can loose out twice.

        One last thing I’d like to point out and that there is very little documentation on the Status Options in WooCommerce. Right now we have:

        Pending
        Failed
        On-Hold
        Processing
        Completed
        Refunded
        Cancelled

        What I’m starting to realize is that these options are more esthetics for the Seller than anything else. For example, Pending, Processing, Completed, Oh-Hold, Suspend do nothing to affect the permissions a user may have. Only Refunded and Cancelled. There is also no way to manage the emails that get sent depending on what the status is. I hope they address this in WooCommerce 2.0.

        Thanks again for replying to my questions.

        • kento February 11, 2013 at 1:53 pm #

          Hi John,

          Thanks for your detailed explanation, I think the best solution would be to just add this functionality to the Groups WooCommerce plugin. WooCommerce Subscriptions already provides the necessary actions when a subscription is suspended and reactivated, so it’s just removing the user from the group and adding back again at the right time if these happen. I’ve added the feature request, depending on the complexity of its implementation, I hope it can be included with the next update of the Groups WooCommerce plugin.

          Cheers

  46. Paul January 24, 2013 at 3:27 pm #

    Yip no matter what way I try I cannot get it to work as an editor on a custom post type? Should I give up or am I just doing something wrong.. I would be very happy if I was just doing something wrong..

  47. Paul January 24, 2013 at 1:05 pm #

    Hi.

    I’m hoping you can help.. What I’m trying to do is create a website for the different departments in my company.. Basically I am the administrator.. and I want the individual team leaders to be editors..

    I need the team leaders to be able to add users (I’ve allowed this using User role editor plugin) and then assign each user to an individual group.. so they can control the content that they want to show to each of their team members.. This seems to work if I (as the administrator) give set up the team members as users and as groups.. but when I try to do it as an editor I am able to tick the box for access restrictions that I want and when I try to publish the page/post it gets unticked again.

    I do not wish to give the team leaders access to all administrator privileges and had gone down the route and created another administrator and hidden the menu options I do not want to show bases on username.. but obviously this is not a good solution..

    Please help if you can..

    Thanks

    • Paul January 24, 2013 at 3:03 pm #

      ok.. I’m getting confused now.. It is working for editors on normal posts.. but when I try to update a custom post type and restrict access as an editor it doesn’t update on publishing..

    • kento January 28, 2013 at 1:40 pm #

      Hi Paul,

      Testing this as an Editor (i.e. a user with the Editor role), when publishing a post with the groups_read_post access restriction checked, the post (or page) is published and the access restriction is checked. When the user does not have the groups_read_post capability, trying to view the post will get a ‘Not Found’ error. But I can’t confirm what you describe so this is probably a conflict. Please try to disable all other plugins and test again.

      • Paul March 7, 2013 at 3:32 pm #

        Hi Kento,

        Apologies for taking so long to get back to you . I”ve been off work for the last month and am only getting back to this project now..

        Right.. I’m not sure if I explained myself clearly at all..I’m talking about write access to the post. Basically what I have done is create a user for my team leaders.. I have assigned them an editor role.

        I have also (as an administrator) created groups, say for this example, TEAMA and TEAMB. I have assigned a capability to TEAMA called read_teama and a cabability to TEAMB called read_teamb. These capabilities appear in the Access restrictions box on the post

        I have created some users and assigned them the subscribers role. I have assigned half of these users into TEAMA and half into TEAMB.

        When I (the user with an administrator role) create a post, I am able to select the capability on the post and publish it.. And on testing the front end it is indeed available for the users in the Group with the correct capability. so I’m happy with that.

        What I want to do is allow the team leader who has the role of editor on the site to be able to publish the post and select what capability should be allowed to access it.. I follow the same procedure as above but after I select the capability and publish the post, the checkbox for the capability returns unchecked.

        I don’t want to give the tram leaders the role of administrator. So I’m just wondering if this functionality is available for users with a role of editor?

        I’ve set up a clean installation of wordpress 3.5.1 and am using twenty twelve theme with only the groups plugin installed and activated. So I think I can rule out a plugin conflict?

        Thanks for your help.

        Paul

        • kento March 9, 2013 at 9:29 pm #

          Hi Paul,

          Can you grant admin access to have a look?

          • Sean March 27, 2014 at 3:32 am #

            Did you find a solution to this? This is exactly what I’m looking for as well. I want to give my editors the capability to set the access restrictions for a post they’ve created.

            • kento April 1, 2014 at 10:24 pm #

              They simply need to be in a group which has the capability you want to allow them to use to restrict access.

  48. Frederick January 24, 2013 at 7:49 am #

    I am currently putting together a Woocommerce powered site and need the ability to:

    1. Allow customers to purchase access to a single WP “Page”. (Product)
    2. Allow customers to subscribe and have access to many (or all) protected pages.

    There will be several single “Page” products (containing video tutorials), so creating a group for each product doesn’t seem right.

    Would this plug-in be able to handle this? Am I thinking about this incorrectly?

    Thank you!
    Frederick

    • kento January 26, 2013 at 1:22 pm #

      In this case I would use one group per page and one group that grants access to all the pages (or more for subsets). Using own access restriction capabilities for each group you should be able to handle that nicely.

  49. Romain January 23, 2013 at 4:40 pm #

    Hi,
    I have two different forms on my site and i want 2 groups of users on my site, is there a way to automatically add users in the specific group after one of form suscribed.
    Regards

    Romain

    • kento January 25, 2013 at 8:24 pm #

      Hi Romain,
      What are you using to create the forms please? If there are actions triggered you can use them to assign the user to a group.

  50. zack January 23, 2013 at 3:39 am #

    Just wanted to double check:
    Can a user could be added to multiple groups?

    • kento January 23, 2013 at 11:58 am #

      Yes, a user can be added to as many groups as you want. Also you can create any number of groups, there is no limit on that either.

      • Tom March 20, 2014 at 11:16 pm #

        It seems a group cannot be added to more than one other group. Is this something that you plan to implement in the near future?

        • kento March 24, 2014 at 11:52 pm #

          You mean like a many-to-many relationship within the group hierarchy? Not really. What use case do you try to cover?

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