Skip to content

Update Group

corsacca edited this page Feb 27, 2018 · 1 revision

This page is a work in progress. The code is being made to follow this documentation

The function source code: Update group function

PHP Class function

Usage

Disciple_Tools_Groups::update_group( $group_id, $fields, true );

Parameters

  • int group_id (Required): the id of the group you want to update
  • array fields (Required): an array of fields like name, phone number corresponding to the new group. See Group-Fields-Format
  • bool check_permissions: check if the signed in user has the permission to perform this action. By default this should be true, unless this is called by an automated process.

Returns:

  • The updated group
  • WP_ERROR, in case something went wrong.

Rest API:

  • url: https://example.com/wp-json/dt/v1/group/[group id]
  • type: POST
  • data: A JSON string of fields object. See Group-Fields-Format
  • contentType: "application/json; charset=UTF-8",
  • dataType: "json",

Fields

Have a look at the fields page: Group-Fields-Format

Developer Documentation

Clone this wiki locally