AFFWP_SPECIFICTYPEREFERRAL::define_trigger()
Define and register the trigger by pushing it into the Automator object
Source Source
File: src/integrations/affiliate-wp/triggers/affwp-specifictypereferral.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( __( 'An affiliate makes a referral of a {{specific type:%1$s}}', 'uncanny-automator' ), $this->trigger_meta ), /* translators: Logged-in trigger - Affiliate WP */ 'select_option_name' => __( 'An affiliate makes a referral of a {{specific type}}', 'uncanny-automator' ), 'action' => 'affwp_insert_referral', 'priority' => 99, 'accepted_args' => 1, 'validation_function' => array( $this, 'affwp_insert_specific_type_referral' ), 'options' => [ Automator()->helpers->recipe->affiliate_wp->options->get_referral_types( null, $this->trigger_meta, [ 'any_option' => true ] ), ], ); Automator()->register->trigger( $trigger ); return; }
Expand full source code Collapse full source code View on Github