/** * We need to override the default get_save_error_message method for cases when they are disconnecting, switching auth methods or their credentials are not valid. * Be sure to call parent::get_save_error_message() at the end. */ public function get_save_error_message($sections) { if ($this->is_switch()) { return __('Switched authentication method.', 'gfeloqua'); } if ($this->is_disconnect()) { return __('Your connection settings have been removed.', 'gfeloqua'); } if (!$this->get_connection_string() && $this->tried_to_setup()) { return __('Unable to connect to Eloqua. Invalid authentication credentials. (Invalid Connection String)', 'gfeloqua'); } if ($this->get_connection_string() && !$this->test_authentication()) { return __('Unable to connect to Eloqua. Invalid authentication credentials.', 'gfeloqua'); } return parent::get_save_error_message($sections); }