Getting all group names error
-
I recently noticed an error on the first line of this function that gets all group names:
$groupsPlugin = new \Groups_Group();
Missing argument 1 for Groups_Group::__construct()
phpStorm is telling me that a $group_id param is missing
The entire function looks like this:
public function get_group_names(){ $groupsPlugin = new \Groups_Group(); $groups = $groupsPlugin->get_groups(); $groupArr = array(); foreach($groups as $key => $value){ $groupArr[$key]['name']= $value->name; } wp_send_json($groupArr); }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Getting all group names error’ is closed to new replies.