WM_ADDUSER_A::define_action()
Define and register the action by pushing it into the Automator object Add the user to {a membership level}
Source Source
File: src/integrations/wishlist-member/actions/wm-adduser-a.php
public function define_action() { $action = [ 'author' => Automator()->get_author_name(), 'support_link' => Automator()->get_author_support_link( $this->action_code, 'integration/wishlist-member/' ), 'integration' => self::$integration, 'code' => $this->action_code, /* translators: Action - Wishlist Member */ 'sentence' => sprintf( esc_attr__( 'Add the user to {{a membership level:%1$s}}', 'uncanny-automator' ), $this->action_meta ), /* translators: Action - Wishlist Member */ 'select_option_name' => esc_attr__( 'Add the user to {{a membership level}}', 'uncanny-automator' ), 'priority' => 99, 'accepted_args' => 1, 'execution_function' => [ $this, 'add_user_to_membership_levels' ], 'options' => [ Automator()->helpers->recipe->wishlist_member->options->wm_get_all_membership_levels( null, $this->action_meta, [ 'include_all' => true, ] ), ], ]; Automator()->register->action( $action ); }
Expand full source code Collapse full source code View on Github