AC_USER_ADD::setup_action()

Setup Action.

Contents


Return Return

(Uncanny_Automatorvoid.)


Source Source

File: src/integrations/active-campaign/actions/ac-user-add.php

	protected function setup_action() {
		$this->set_integration( 'ACTIVE_CAMPAIGN' );
		$this->set_action_code( $this->prefix . '_CODE' );
		$this->set_action_meta( $this->prefix . '_META' );
		$this->set_is_pro( false );
		$this->set_requires_user( true );
		/* translators: Action - WordPress */
		$this->set_sentence( sprintf( esc_attr__( 'Add {{the user:%1$s}} to ActiveCampaign', 'uncanny-automator' ), $this->get_action_meta() ) );
		/* translators: Action - WordPress */
		$this->set_readable_sentence( esc_attr__( 'Add {{the user}} to ActiveCampaign', 'uncanny-automator' ) );
		$options_group = array(
			$this->get_action_meta() => array(
				array(
					'option_code' => $this->prefix . '_PHONE_NUMBER',
					'label'       => esc_attr__( 'Phone number', 'uncanny-automator' ),
					'placeholder' => esc_attr__( '(+00) 987 123 4567', 'uncanny-automator' ),
					'input_type'  => 'text',
					'required'    => false,
				),
				array(
					'input_type'  => 'text',
					'option_code' => 'ACTIVECAMPAIGNHIDDEN',
					'is_hidden'   => true,
				),
			),
		);
		$this->set_options_group( $options_group );
		$this->register_action();
	}