verygoodplugins

Untitled

Jan 25th, 2021
455
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $params = wp_fusion()->crm->get_params();
  2.  
  3. $engagement_data = array(
  4.     'engagement'   => array(
  5.         'type' => 'NOTE',
  6.     ),
  7.     'associations' => array(
  8.         'dealIds' => array( $deal_id ),
  9.     ),
  10.     'metadata'     => array(
  11.         'body' => $body,
  12.     ),
  13. );
  14.  
  15. $params         = wp_fusion()->crm->get_params();
  16. $params['body'] = json_encode( $engagement_data );
  17.  
  18. $response = wp_remote_post( 'https://api.hubapi.com/engagements/v1/engagements', $params );
RAW Paste Data