ANON_MAILCHIMP_CONTACT_EMAIL_CHANGED::setup_trigger()
Define and register the trigger by pushing it into the Automator object
Source Source
File: src/integrations/mailchimp/triggers/anon-mailchimp-contact-email-changed.php
public function setup_trigger() { $this->set_integration( 'MAILCHIMP' ); $this->set_trigger_code( self::TRIGGER_CODE ); $this->set_trigger_meta( self::TRIGGER_META ); $this->set_trigger_type( 'anonymous' ); $this->set_is_login_required( false ); $this->set_is_pro( false ); /* Translators: Trigger sentence */ $this->set_sentence( esc_html__( 'A contact email is changed', 'uncanny-automator' ) ); /* Translators: Trigger sentence */ $this->set_readable_sentence( esc_html__( 'A contact email is changed', 'uncanny-automator' ) ); // Non-active state sentence to show $this->add_action( 'automator_mailchimp_webhook_received_upemail' ); // which do_action() fires this trigger if ( get_option( 'uap_mailchimp_enable_webhook', false ) ) { $this->register_trigger(); // Registering this trigger } }
Expand full source code Collapse full source code View on Github