AUTONAMI_TOKENS::save_contact_tokens( mixed $bwfcrm_contact, mixed $entry )

Method save_contact_tokens


Parameters Parameters

$bwfcrm_contact

(Required)

$entry

(Required)


Top ↑

Return Return

(void)


Source Source

File: src/integrations/autonami/tokens/autonami-tokens.php

	public function save_contact_tokens( $bwfcrm_contact, $entry ) {

		$contact = $bwfcrm_contact->contact;

		Automator()->db->token->save( 'CONTACT_ID', $contact->get_id(), $entry );
		Automator()->db->token->save( 'CONTACT_EMAIL', $contact->get_email(), $entry );
		Automator()->db->token->save( 'CONTACT_FNAME', $contact->get_f_name(), $entry );
		Automator()->db->token->save( 'CONTACT_LNAME', $contact->get_l_name(), $entry );
		Automator()->db->token->save( 'CONTACT_PHONE', $contact->get_contact_no(), $entry );
		Automator()->db->token->save( 'CONTACT_COUNTRY', $contact->get_country(), $entry );
		Automator()->db->token->save( 'CONTACT_STATE', $contact->get_state(), $entry );
		Automator()->db->token->save( 'CONTACT_TIMEZONE', $contact->get_timezone(), $entry );
		Automator()->db->token->save( 'CONTACT_TYPE', $contact->get_type(), $entry );
		Automator()->db->token->save( 'CONTACT_SOURCE', $contact->get_source(), $entry );
		Automator()->db->token->save( 'CONTACT_TAGS', $this->comma_separated_tags( $bwfcrm_contact ), $entry );
		Automator()->db->token->save( 'CONTACT_LISTS', $this->comma_separated_lists( $bwfcrm_contact ), $entry );
		Automator()->db->token->save( 'CONTACT_CREATION_DATE', $contact->get_creation_date(), $entry );
		Automator()->db->token->save( 'CONTACT_MODIFIED_DATE', $contact->get_last_modified(), $entry );
		Automator()->db->token->save( 'CONTACT_STATUS', $this->get_status_name( $contact ), $entry );
		Automator()->db->token->save( 'CONTACT_STATUS_ID', $contact->get_status() . ' ', $entry );
	}