-
Notifications
You must be signed in to change notification settings - Fork 62
Update Contact
corsacca edited this page Feb 27, 2018
·
12 revisions
This page is a work in progress. The code is being made to follow this documentation
The function source code: Update contact function
Disciple_Tools_Contacts::update_contact( $contact_id, $fields, true );
- int contact_id (Required): the id of the contact you want to update
- array fields (Required): an array of fields like name, phone number corresponding to the new contact. See Contact-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.
- The updated contact
- WP_ERROR, in case something went wrong.
- url:
https://example.com/wp-json/dt/v1/contact/[contact id]
- type: POST
- data: A JSON string of fields object. See Contact-Fields-Format
- contentType: "application/json; charset=UTF-8",
- dataType: "json",
Have a look at the fields page: Contact-Fields-Format