Upgrader
in package
Tags
Table of Contents
- OPTION_DB_HISTORY = 'mpa_db_history'
- Database versions history option name.
- OPTION_DB_VERSION = 'mpa_db_version'
- $dbHistory : string
- Previous versions history.
- $dbVersion : string
- Current DB version.
- $neededUpgrade : array<string|int, array<string|int, mixed>>
- All versions that need upgrade.
- $pluginVersion : string
- Current plugin version.
- __construct() : mixed
- addServicesColor() : mixed
- maybeUpgrade() : mixed
- updateSettingsForPayments() : mixed
- 1) Remove option "Default Appointment Status".
- upgradeEmailsForMultibooking() : mixed
- Removes: 1) admin and customer emails (only subjects, headers and messages); 2) template parts.
- addActions() : mixed
- addHistory() : mixed
- checkVersions() : mixed
- setVersion() : mixed
- upgrade() : mixed
- upgradeTo() : mixed
Constants
OPTION_DB_HISTORY
Database versions history option name.
public
mixed
OPTION_DB_HISTORY
= 'mpa_db_history'
Tags
OPTION_DB_VERSION
public
mixed
OPTION_DB_VERSION
= 'mpa_db_version'
Tags
Properties
$dbHistory
Previous versions history.
protected
string
$dbHistory
= ''
Tags
$dbVersion
Current DB version.
protected
string
$dbVersion
= '1.0.0'
Tags
$neededUpgrade
All versions that need upgrade.
protected
array<string|int, array<string|int, mixed>>
$neededUpgrade
= [
// Use long versions, e.g. '1.4.0' instead of '1.4' (similar to the
// constant Appointment\VERSION)
'1.4.0' => 'upgradeEmailsForMultibooking',
'1.5.0' => 'updateSettingsForPayments',
'1.11.0' => 'addServicesColor',
]
Tags
$pluginVersion
Current plugin version.
protected
string
$pluginVersion
= '1.0.0'
Tags
Methods
__construct()
public
__construct() : mixed
Tags
Return values
mixed —addServicesColor()
public
addServicesColor() : mixed
Return values
mixed —maybeUpgrade()
public
maybeUpgrade() : mixed
Tags
Return values
mixed —updateSettingsForPayments()
1) Remove option "Default Appointment Status".
public
updateSettingsForPayments() : mixed
- Set the actual value of the "Confirmation Mode" option.
Tags
Return values
mixed —upgradeEmailsForMultibooking()
Removes: 1) admin and customer emails (only subjects, headers and messages); 2) template parts.
public
upgradeEmailsForMultibooking() : mixed
Tags
Return values
mixed —addActions()
protected
addActions() : mixed
Tags
Return values
mixed —addHistory()
protected
addHistory(string $version) : mixed
Parameters
- $version : string
Tags
Return values
mixed —checkVersions()
protected
checkVersions() : mixed
Tags
Return values
mixed —setVersion()
protected
setVersion(string $version) : mixed
Parameters
- $version : string
Tags
Return values
mixed —upgrade()
protected
upgrade() : mixed
Tags
Return values
mixed —upgradeTo()
protected
upgradeTo(string $version, mixed $callbacks) : mixed
Parameters
- $version : string
- $callbacks : mixed