You are here

function eu_cookie_compliance_update_8102 in EU Cookie Compliance (GDPR Compliance) 8

Reverse the setting for "Consent by clicking" (solving a module beta bug).

File

./eu_cookie_compliance.install, line 162
Update scripts for the EU Cookie Compliance module.

Code

function eu_cookie_compliance_update_8102() {
  $consent_by_clicking_value = \Drupal::configFactory()
    ->get('eu_cookie_compliance.settings')
    ->get('popup_clicking_confirmation');
  \Drupal::configFactory()
    ->getEditable('eu_cookie_compliance.settings')
    ->set('popup_clicking_confirmation', !$consent_by_clicking_value)
    ->save();
}