AC_TOKENS::register_tokens( mixed $tokens = array(), mixed $args = array() )

register_tokens


Parameters Parameters

$tokens

(Optional)

Default value: array()

$args

(Optional)

Default value: array()


Top ↑

Return Return

(void)


Source Source

File: src/integrations/active-campaign/tokens/ac-tokens.php

	public function register_tokens( $tokens = array(), $args = array() ) {

		if ( ! automator_do_identify_tokens() ) {
			return $tokens;
		}

		$trigger_integration = $args['integration'];
		$trigger_meta        = $args['meta'];

		$tokens[] = array(
			'tokenId'         => 'EMAIL',
			'tokenName'       => __( 'Email address', 'uncanny-automator' ),
			'tokenType'       => 'text',
			'tokenIdentifier' => 'CONTACT_TAG_ADDED',
		);

		$tokens[] = array(
			'tokenId'         => 'TAGS',
			'tokenName'       => __( 'All contact tags (comma separated)', 'uncanny-automator' ),
			'tokenType'       => 'text',
			'tokenIdentifier' => 'CONTACT_TAG_ADDED',
		);

		$tokens[] = array(
			'tokenId'         => 'FIRST_NAME',
			'tokenName'       => __( 'First Name', 'uncanny-automator' ),
			'tokenType'       => 'text',
			'tokenIdentifier' => 'CONTACT_TAG_ADDED',
		);

		$tokens[] = array(
			'tokenId'         => 'LAST_NAME',
			'tokenName'       => __( 'Last name', 'uncanny-automator' ),
			'tokenType'       => 'text',
			'tokenIdentifier' => 'CONTACT_TAG_ADDED',
		);

		$tokens[] = array(
			'tokenId'         => 'PHONE',
			'tokenName'       => __( 'Phone', 'uncanny-automator' ),
			'tokenType'       => 'text',
			'tokenIdentifier' => 'CONTACT_TAG_ADDED',
		);

		$tokens[] = array(
			'tokenId'         => 'CUSTOMER_ACCT_NAME',
			'tokenName'       => __( 'Account', 'uncanny-automator' ),
			'tokenType'       => 'text',
			'tokenIdentifier' => 'CONTACT_TAG_ADDED',
		);

		return $tokens;
	}