step_token = $step_token; } /** * @param null|WP_Error|WP_User $user * * @return bool */ public function supports( $user ) { return $this->is_wp_user( $user ); } /** * @param null|WP_Error|WP_User $user * * @return bool|JSON_Response|Redirection_Response|View_Response */ protected function handle( $user ) { try { $this->step_token->generate(); } catch ( User_Not_Found_Exception $e ) { return $this->json_error( Errors::USER_NOT_FOUND_ERROR, 404 ); } return $this->fallback( $user ); } }