Upgrader
in package

Tags
since
1.4.0

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
since
1.4.0

OPTION_DB_VERSION

public mixed OPTION_DB_VERSION = 'mpa_db_version'
Tags
since
1.4.0

Properties

$dbHistory

Previous versions history.

protected string $dbHistory = ''
Tags
since
1.4.0

$dbVersion

Current DB version.

protected string $dbVersion = '1.0.0'
Tags
since
1.4.0

$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
since
1.4.0

$pluginVersion

Current plugin version.

protected string $pluginVersion = '1.0.0'
Tags
since
1.4.0

Methods

__construct()

public __construct() : mixed
Tags
since
1.4.0
Return values
mixed

addServicesColor()

public addServicesColor() : mixed
Return values
mixed

maybeUpgrade()

public maybeUpgrade() : mixed
Tags
since
1.4.0
access

protected

Return values
mixed

updateSettingsForPayments()

1) Remove option "Default Appointment Status".

public updateSettingsForPayments() : mixed
  1. Set the actual value of the "Confirmation Mode" option.
Tags
since
1.5.0
access

protected

Return values
mixed

upgradeEmailsForMultibooking()

Removes: 1) admin and customer emails (only subjects, headers and messages); 2) template parts.

public upgradeEmailsForMultibooking() : mixed
Tags
since
1.4.0
access

protected

global

wpdb $wpdb

Return values
mixed

addActions()

protected addActions() : mixed
Tags
since
1.4.0
Return values
mixed

addHistory()

protected addHistory(string $version) : mixed
Parameters
$version : string
Tags
since
1.4.0
Return values
mixed

checkVersions()

protected checkVersions() : mixed
Tags
since
1.4.0
Return values
mixed

setVersion()

protected setVersion(string $version) : mixed
Parameters
$version : string
Tags
since
1.4.0
Return values
mixed

upgrade()

protected upgrade() : mixed
Tags
since
1.4.0
Return values
mixed

upgradeTo()

protected upgradeTo(string $version, mixed $callbacks) : mixed
Parameters
$version : string
$callbacks : mixed
Tags
since
1.4.0
Return values
mixed

Search results