Documentation

DatabaseUpgrades
in package
Uses UtilsProvider

Apply database migrations when we update the plugin.

Table of Contents

Properties

$installed  : string|false
Installed version.

Methods

__construct()  : mixed
C'tor.
apply()  : mixed
A new version got installed, run all our migrations if not yet migrated.
getPluginConstantPrefix()  : string
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
migration_22wkegu()  : mixed
Create a `isDefault` meta key for all service groups (terms) so they can be differentiated in the cookie policy editor.
migration_861n6fudh()  : mixed
Update the MD5 hash of truncated JSON strings in the revision database tables.
migration_1td2xu0()  : mixed
We have updated our Real Cookie Banner template and we need to automatically apply the patch to the Real Cookie Banner service.
migration_1xwnv8m()  : mixed
Reset "Animation only on mobile devices" default to `false` as it should not be activated automatically for already existing users.
migration_1ydq6ff()  : mixed
Move all found markups to the respective new database table and drop the known markup column.
migration_20chay0()  : mixed
Deactivate "Use same stylings as 'Accept all'" as it should not be activated automatically for already existing users.
migration_2d8dedh()  : mixed
Multiple metadata rename migrations.
migration_2rb441c()  : mixed
Revert to cookie version 1 for users already using RCB.
migration_2undj42()  : mixed
Fill the `ui_view` database column.
migration_2unhn5x()  : mixed
Rename `consentForwardingUniqueName` to `uniqueName` and create one if missing.
migration_2vqpmwj()  : mixed
Automatically check the checklist item if "Real Cookie Banner" is already mentioned in current privacy policy.
migration_2z4e99b()  : mixed
Create direct aggregates in database instead of calculating from consents.
migration_861m47jgm()  : mixed
Automatically convert ePrivacy USA flag to data processing in unsafe countries.
migration_863gt04va()  : mixed
With the introduction of TCF 2.2, IAB Europe recommends to only use TCF vendors which are really used while data processing. When there are more than x vendors created previsouly, show a notice.
migration_863h7nj72()  : mixed
With the introduction of the legal basis in Settings > General, we now need to output the selected legal basis in the cookie banner for the "Data processing in unsafe countries".
migration_866awy2fr()  : mixed
With the introduction of the age notice age limit in Settings > Consent, we now need to output the age limit in the cookie banner. For this, we update the configured texts and replace the "16 years" with the new `{{minAge}} years` variable.
migration_866ay8jeb()  : mixed
With the introduction of the footer links in Cookies > Settings, we had a bug that migrated banner links did not update the checklist item accordingly.
migration_86940n0a0()  : mixed
Disable maximum height customize setting for the cookie banner for already existing users.
migration_86951yt9g()  : mixed
We have introduced a new `button_clicked` for implicit consents (e.g. Country Bypass): `implicit_all` and `implicit_essential`. With a SQL query we can update older consents to reflect the correct `button_clicked` for Country Bypass by reading the configuration from the revisions.
migration_apv5uu()  : mixed
We have renamed the TCF Stacks in customizer to "Accordion" so it is not restricted to TCF-only.
migration_cawgkp()  : mixed
With the introduction of the footer links in Cookies > Settings, we also removed the "Legal" section in the customizer. The links are now completely customizable via a custom post type.
migration_we5cq1()  : mixed
Delete the already known, randomly selected powered-by text and regenerate it.

Properties

Methods

__construct()

C'tor.

public __construct() : mixed
Tags
codeCoverageIgnore

apply()

A new version got installed, run all our migrations if not yet migrated.

public apply(string|false $installed) : mixed
Parameters
$installed : string|false

getPluginConstantPrefix()

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

public getPluginConstantPrefix() : string
Tags
codeCoverageIgnore

It only returns a string with the constant prefix

Return values
string

migration_22wkegu()

Create a `isDefault` meta key for all service groups (terms) so they can be differentiated in the cookie policy editor.

public migration_22wkegu() : mixed

Additionally, add the revision hash to the option which holds the current revision hash.

Reset "Hide less relevant service details" default to false as it should not be activated automatically for already existing users.

Tags
see
https://app.clickup.com/t/22wkegu
see
https://app.clickup.com/t/8694wynf7

migration_863gt04va()

With the introduction of TCF 2.2, IAB Europe recommends to only use TCF vendors which are really used while data processing. When there are more than x vendors created previsouly, show a notice.

protected migration_863gt04va() : mixed
Tags
see
https://app.clickup.com/t/863gt04va

migration_863h7nj72()

With the introduction of the legal basis in Settings > General, we now need to output the selected legal basis in the cookie banner for the "Data processing in unsafe countries".

protected migration_863h7nj72() : mixed

For this, we update the configured texts and replace the legal basis with the new {{legalBasis}} variable.

  • Add Switzerland (CH) to the country bypass list.
  • Set the TCF publisher country as operator country when given from older installations, and, calculate the isProviderCurrentWebsite for all services.
Tags
see
https://app.clickup.com/t/863h7nj72

migration_866awy2fr()

With the introduction of the age notice age limit in Settings > Consent, we now need to output the age limit in the cookie banner. For this, we update the configured texts and replace the "16 years" with the new `{{minAge}} years` variable.

protected migration_866awy2fr() : mixed
Tags
see
https://app.clickup.com/t/866awy2fr

migration_866ay8jeb()

With the introduction of the footer links in Cookies > Settings, we had a bug that migrated banner links did not update the checklist item accordingly.

protected migration_866ay8jeb() : mixed
Tags
see
https://app.clickup.com/t/866ay8jeb

migration_86951yt9g()

We have introduced a new `button_clicked` for implicit consents (e.g. Country Bypass): `implicit_all` and `implicit_essential`. With a SQL query we can update older consents to reflect the correct `button_clicked` for Country Bypass by reading the configuration from the revisions.

protected migration_86951yt9g() : mixed
Tags
see
https://app.clickup.com/t/86951yt9g

migration_cawgkp()

With the introduction of the footer links in Cookies > Settings, we also removed the "Legal" section in the customizer. The links are now completely customizable via a custom post type.

protected migration_cawgkp() : mixed
Tags
see
https://app.clickup.com/t/cawgkp

        
On this page

Search results