plugin_compatibility = $plugin_compatibility; $this->request = $request; } /** * @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 ) { if ( $this->is_wp_user( $user ) && $this->plugin_compatibility->is_external_login( $this->request ) ) { return $this->redirect( $this->plugin_compatibility->get_redirect_to_url( $this->request ) ); } return $this->run_next( $user, $response ); } }