AC_CONTACT_TAG_ADDED::setup_trigger()
Define and register the trigger by pushing it into the Automator object
Source Source
File: src/integrations/active-campaign/triggers/ac-contact-tag-added.php
public function setup_trigger() { $this->set_integration( 'ACTIVE_CAMPAIGN' ); $this->set_trigger_code( 'CONTACT_TAG_ADDED' ); $this->set_trigger_meta( 'TAG' ); $this->set_trigger_type( 'anonymous' ); $this->set_is_login_required( false ); /* Translators: Some information for translators */ $this->set_sentence( sprintf( '{{A tag:%1$s}} is added to a contact', $this->get_trigger_meta() ) ); // Sentence to appear when trigger is added. {{a page:%1$s}} will be presented in blue box as selectable value /* Translators: Some information for translators */ $this->set_readable_sentence( '{{A tag}} is added to a contact' ); // Non-active state sentence to show $this->add_action( 'automator_active_campaign_webhook_received' ); // which do_action() fires this trigger $this->set_options_callback( array( $this, 'load_options' ) ); if ( get_option( 'uap_active_campaign_enable_webhook', false ) ) { $this->register_trigger(); // Registering this trigger } }
Expand full source code Collapse full source code View on Github