• Resolved elronaldo

    (@elronaldo)


    We are preparing a plugin shortcode that will go on the same page with the [uo_groups] shortcode (what a great plugin! If a group leader is a leader in more than 1 group, they get a drop-down to select the group they wish to work with!)

    So in our plugin we desperately need access to the current group ID once the group leader has made a selection and chosen the group they wish to administer. It looked like $ulgm_current_managed_group_id or GroupManagementInterface::$ulgm_current_managed_group_id might do the trick, bit the former does not come up with a value and the latter causes an error. Is there a variable, function or method we can get to return the currently selected group ID? learndash_get_groups($user_id) is getting us a nice, accurate list of groups, but we need the actual current group ID once the group leader has made a group selection from the [uo_groups] – furnished drop-down.

    Any help or suggestions?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Uncanny Owl

    (@uncannyowl)

    Hi @elronaldo ,

    Our team would be thrilled to help, but we did just want to note that this forum is for the Uncanny Toolkit plugin. For anything related to other plugins, you can log a ticket from inside your account on our site or send us a note. That will help us ensure that we can get your enquiry in front of the right developers on our team.

    Having said, one of our developers took a quick look and says you should use this:

    \uncanny_learndash_groups\GroupManagementInterface::$ulgm_current_managed_group_id;

    I’ll go ahead and close the ticket, but if you have questions and want to follow up you can open a ticket from our site for any Uncanny Groups questions.

Viewing 1 replies (of 1 total)
  • The topic ‘Get current group ID in PHP’ is closed to new replies.