• Resolved Tim Rodman

    (@trodman)


    I’m interested in using ig_es_add_contact to programmatically manage my Audience. Is there documentation on the ig_es_add_contact action?

Viewing 1 replies (of 1 total)
  • Plugin Contributor kishanranawat

    (@kishanranawat)

    Hi there,

    Currently, there is no technical documentation on how to use the action but you can use the following code snippet to add contacts programmatically.

    
    $list_id = 1;
            
    $contact_data = array(
    	'first_name' => 'Test',
    	'last_name'  => 'User',
    	'email'      => '[email protected]',
    	'source'     => 'wp',
    	'status'     => 'verified',
    	'hash'       => ES_Common::generate_guid(),
    	'created_at' => ig_get_current_date_time(),
    	'wp_user_id' => 3, // Associated WordPress user id if present.
    );
    
    do_action( 'ig_es_add_contact', $contact_data, $list_id );

    Hope this helps you. Let us know if you have any further queries.

Viewing 1 replies (of 1 total)
  • The topic ‘ig_es_add_contact Action’ is closed to new replies.