Skip to content

Instantly share code, notes, and snippets.

@wpcrmsystem
Created December 19, 2017 23:12
Show Gist options
  • Save wpcrmsystem/82cd4a7ac2105496c3cd510de85f8921 to your computer and use it in GitHub Desktop.
Save wpcrmsystem/82cd4a7ac2105496c3cd510de85f8921 to your computer and use it in GitHub Desktop.
<?php
function wpcrmsystem_add_record(){
$fields = array(
'title' => 'South America',
'org' => 'Autobot',
'contact' => 'Mathew Powers',
'campaign' => 'Conquer the world',
'assigned' => 'user@yourcrm.com',
'probability' => '25',
'close_date' => '12/30/2017',
'value' => '10000',
'won_lost' => 'won',
'additional' => 'This is some extra content.',
);
$custom_fields = array(
'Opportunity import' => 'More information',
);
$categories = 'Graphics, Design';
$status = 'publish';
$author = '1';
$update = false;
$create = new WPCRM_System_Create;
$create->opportunities( $fields, $custom_fields, $categories, $status, $author, $update );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment