Advertisement
verygoodplugins

Untitled

Jul 8th, 2021
1,239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. $order = array(
  2.     'associations' => array(
  3.         'associatedVids' => array( $contact_id ),
  4.     ),
  5.     'properties'   => array(
  6.         array(
  7.             'name'  => 'dealname',
  8.             'value' => 'DEAL TITLE',
  9.         ),
  10.         array(
  11.             'name'  => 'pipeline',
  12.             'value' => 'DEAL PIPELINE',
  13.         ),
  14.         array(
  15.             'name'  => 'dealstage',
  16.             'value' => 'DEAL STAGE',
  17.         ),
  18.         array(
  19.             'name'  => 'closedate',
  20.             'value' => $order_date * 1000,
  21.         ),
  22.         array(
  23.             'name'  => 'amount',
  24.             'value' => $total,
  25.         ),
  26.     ),
  27. );
  28.  
  29. wpf_log(
  30.     'info', $user_id, 'Adding custom deal:', array(
  31.         'meta_array_nofilter' => $order,
  32.     )
  33. );
  34.  
  35. $params         = wp_fusion()->crm->get_params();
  36. $params['body'] = json_encode( $order );
  37.  
  38. $response = wp_remote_post( 'https://api.hubapi.com/deals/v1/deal', $params );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement