Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function update_contact( $contact_id, $data, $map_meta_fields = true ) {
- if(is_wp_error( $this->connect() ))
- return false;
- if($map_meta_fields == true)
- $data = wp_fusion()->crm_base->map_meta_fields( $data );
- if(empty($data))
- return true;
- if(!isset($data['email']))
- $data['email'] = $this->get_email_from_cid($contact_id);
- $result = $this->app->api( 'contact/sync', $data );
- if( $result->success == 1 ) {
- return true;
- } else {
- return false;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement