AFFWP_NEWAFFILIATEAPPROVED::define_trigger()

Define and register the trigger by pushing it into the Automator object


Source Source

File: src/integrations/affiliate-wp/triggers/affwp-newaffiliateapproved.php

	public function define_trigger() {

		$trigger = array(
			'author'              => Automator()->get_author_name( $this->trigger_code ),
			'support_link'        => Automator()->get_author_support_link( $this->trigger_code,'integration/affiliatewp/' ),
			'integration'         => self::$integration,
			'code'                => $this->trigger_code,
			/* translators: Logged-in trigger - Affiliate WP */
			'sentence'            => sprintf( __( 'A new affiliate is approved', 'uncanny-automator' ) ),
			/* translators: Logged-in trigger - Affiliate WP */
			'select_option_name'  => __( 'A new affiliate is approved', 'uncanny-automator' ),
			'action'              => 'affwp_set_affiliate_status',
			'priority'            => 99,
			'accepted_args'       => 3,
			'validation_function' => array( $this, 'affwp_affiliate_approved' ),
			'options'             => array(),
		);
		Automator()->register->trigger( $trigger );
		return;
	}