• Hi,
    how do I know the group of a registered user? there is a function or an API? example: get_groups ($userid)

    Also I have to create groups that have the same capabilities of the subscriber or customer role (woocommerce): what are the capabilities that must be assigned to each group?

    thanks

    https://www.ads-software.com/plugins/groups/

Viewing 1 replies (of 1 total)
  • Thread Starter fburatti

    (@fburatti)

    $is_a_member = false;
    require_once( ABSPATH . 'wp-includes/pluggable.php' );
    if ( $group = Groups_Group::read_by_name( 'Foobar' ) ) {
    $is_a_member = Groups_User_Group::read( get_current_user_id() , $group->group_id );
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Get the group(s) of a user’ is closed to new replies.