function sparkpost_update_8001 in Sparkpost email 8.2
Sets API hostname to default (api.sparkpost.com).
File
- ./
sparkpost.install, line 11 - Install, update and uninstall functions for the Sparkpost module.
Code
function sparkpost_update_8001() {
$config_factory = \Drupal::configFactory();
$config = $config_factory
->getEditable('sparkpost.settings');
$current = $config
->get('api_hostname');
if (empty($current)) {
$config
->set('api_hostname', 'api.sparkpost.com');
$config
->save(TRUE);
return t('SparkPost hostname set to default (api.sparkpost.com).');
}
return NULL;
}