step_token = $step_token; } /** * @param WP_Error|WP_User $user * @param JSON_Response|View_Response|null $response * * @return JSON_Response|View_Response|Redirect_Response|null */ public function handle( $user, $response = null ) { try { if ( $this->is_wp_user( $user ) ) { $this->step_token->generate(); } return $this->run_next( $user, $response ); } catch ( User_Not_Found_Exception $e ) { return $this->json_error( Notification::get( 'user-not-found' ), 404 ); } } }