function cookies_update_8003 in COOKiES Consent Management 1.0.x
Remove deprecated callback settings.
File
- ./
cookies.install, line 43 - Installation and update functions for this project.
Code
function cookies_update_8003() {
$config_factory = \Drupal::configFactory();
$config = $config_factory
->getEditable('cookies.config');
$callback_url = $config
->get('callback_url');
if (!$config
->get('use_callback') || $callback_url == '/cookies/example/callback.json' || $callback_url == '') {
$config
->clear('use_callback');
$config
->clear('callback_method');
$config
->clear('callback_url');
}
$config
->set('store_auth_user_consent', false);
$config
->save(TRUE);
}