Upgrader
in package

Table of Contents

OPTION_DB_VERSION  = 'mphb_db_version'
OPTION_DB_VERSION_HISTORY  = 'mphb_db_version_history'
$bgBookingUpgrader2_0_0  : BackgroundBookingUpgrader_2_0_0
$bgBookingUpgrader2_2_0  : BackgroundBookingUpgrader_2_2_0
$bgBookingUpgrader2_3_0  : BackgroundBookingUpgrader_2_3_0
$bgBookingUpgrader4_2_0  : BackgroundBookingUpgrader_4_2_0
$bgUpgrader  : BackgroundUpgrader
$isNeedUpgrade  : mixed
$upgrades  : array<string|int, mixed>
__construct()  : mixed
addBookingCancellationPage()  : mixed
addIndexesToSyncTablesSince_4_0_0()  : mixed
addMyAccountPage()  : mixed
alterTableSyncLogs()  : false
Removes column "log_context" from wp_mphb_sync_logs and changes the type of the column "log_message".
checkVersion()  : mixed
complete()  : mixed
createTableApiKeys()  : mixed
createTableCustomers()  : mixed
createUploadsDir()  : mixed
fixCleanOldRules()  : mixed
fixForV1_1_0()  : mixed
fix for 1.1.0 - Change abandon cron name - Change option name for Cancellation Page
fixForV2_0_0()  : string|bool
fix for 2.0.0 - update bookings structure in db ( create reserved rooms )
fixForV2_2_0()  : string|bool
fix for 2.2.0 - generate UID for all ( create reserved rooms )
fixForV2_3_0()  : string|bool
Fix for 2.3.0 - generate reservation rules for global booking rules; - generate new custom rules (with type ID and room number); - delete global booking rules and old custom rules.
fixForV3_0_0()  : mixed
Delete unused rules options
fixForV3_0_2()  : mixed
1) Create new tables.
fixForV3_2_0()  : mixed
Remove outdated sync logs.
fixForV4_2_0()  : mixed
fixForV4_4_0()  : void
Reverted compatibility with MySQL 5.5 for mphb_customers table
fixForV4_5_0()  : mixed
fixGlobalRule()  : mixed
fixSessionOptions()  : mixed
flushRewriteRules()  : mixed
forceUpgrade()  : mixed
getProgress()  : int
getScheduledVersion()  : string
hideUpgradeNotice()  : mixed
improveStats()  : mixed
Rename all columns from stat_* to import_* and add clean_* columns.
markImported()  : mixed
Mark imported bookings in version 3.4.0.
moveSyncUrls()  : mixed
removeOutdatedStripeOptions()  : mixed
resetDBVersion()  : mixed
setScheduledVersion()  : mixed
showUpgradeNotice()  : mixed
startAutodeleteOfSyncLogs()  : mixed
stopSynchronization()  : mixed
updateDBVersion()  : mixed
upgrade()  : mixed
upgradeAfterImport()  : mixed
addDBVersionToHistory()  : mixed
blockNewBookings()  : mixed
changeOptionName()  : mixed
TODO add support to false value of option
getCurrentDBVersion()  : string
getQueueSize()  : mixed
getTotalQueueSize()  : mixed
setTotalQueueSize()  : mixed

Constants

OPTION_DB_VERSION

public mixed OPTION_DB_VERSION = 'mphb_db_version'

OPTION_DB_VERSION_HISTORY

public mixed OPTION_DB_VERSION_HISTORY = 'mphb_db_version_history'

Properties

$isNeedUpgrade

private mixed $isNeedUpgrade = false

$upgrades

private array<string|int, mixed> $upgrades = array('1.1.0' => array('fixForV1_1_0'), '2.0.0' => array('fixForV2_0_0'), '2.2.0' => array('fixForV2_2_0', 'fixSessionOptions'), '2.3.0' => array('fixForV2_3_0', 'fixGlobalRule', 'fixCleanOldRules'), '2.4.2' => array('flushRewriteRules'), '3.0.0' => array('fixForV3_0_0'), '3.0.2' => array('fixForV3_0_2'), '3.2.0' => array('fixForV3_2_0'), '3.4.0' => array('stopSynchronization', 'markImported', 'improveStats', 'moveSyncUrls'), '3.5.0' => array('createUploadsDir'), '3.6.0' => array('removeOutdatedStripeOptions'), '3.6.1' => array('startAutodeleteOfSyncLogs'), '3.7.0' => array('hideUpgradeNotice'), '3.9.9' => array('addBookingCancellationPage'), '4.0.0' => array('addIndexesToSyncTablesSince_4_0_0'), '4.1.0' => array('createTableApiKeys'), '4.2.0' => array('createTableCustomers', 'addMyAccountPage', 'fixForV4_2_0', 'flushRewriteRules'), '4.2.2' => array( 'stopSynchronization', // Stop active sync to reset the queue with the next start 'alterTableSyncLogs', ), '4.4.0' => array('fixForV4_4_0'), '4.5.0' => array('fixForV4_5_0'))

Methods

__construct()

public __construct() : mixed
Return values
mixed

addBookingCancellationPage()

public addBookingCancellationPage() : mixed
Tags
since
3.9.9
Return values
mixed

addIndexesToSyncTablesSince_4_0_0()

public addIndexesToSyncTablesSince_4_0_0() : mixed
Return values
mixed

addMyAccountPage()

public addMyAccountPage() : mixed
Tags
since
4.2.0
Return values
mixed

alterTableSyncLogs()

Removes column "log_context" from wp_mphb_sync_logs and changes the type of the column "log_message".

public alterTableSyncLogs() : false
Tags
since
4.2.2
global

\wpdb $wpdb

Return values
false

checkVersion()

public checkVersion() : mixed
Return values
mixed

complete()

public complete() : mixed
Return values
mixed

createTableApiKeys()

public createTableApiKeys() : mixed
Return values
mixed

createTableCustomers()

public createTableCustomers() : mixed
Tags
since
4.2.0
Return values
mixed

createUploadsDir()

public createUploadsDir() : mixed
Tags
since
3.5.0
Return values
mixed

fixCleanOldRules()

public fixCleanOldRules() : mixed
Return values
mixed

fixForV1_1_0()

fix for 1.1.0 - Change abandon cron name - Change option name for Cancellation Page

public fixForV1_1_0() : mixed
Return values
mixed

fixForV2_0_0()

fix for 2.0.0 - update bookings structure in db ( create reserved rooms )

public fixForV2_0_0() : string|bool
Return values
string|bool

False when update completed, function name otherwise.

fixForV2_2_0()

fix for 2.2.0 - generate UID for all ( create reserved rooms )

public fixForV2_2_0() : string|bool
Return values
string|bool

False when update completed, function name otherwise.

fixForV2_3_0()

Fix for 2.3.0 - generate reservation rules for global booking rules; - generate new custom rules (with type ID and room number); - delete global booking rules and old custom rules.

public fixForV2_3_0() : string|bool
Return values
string|bool

False when update completed, function name otherwise.

fixForV3_0_0()

Delete unused rules options

public fixForV3_0_0() : mixed
Return values
mixed

fixForV3_0_2()

1) Create new tables.

public fixForV3_0_2() : mixed
  1. Remove outdated sync options.
  2. Move value from "From Email" to "Hotel Administrator Email".
Return values
mixed

fixForV3_2_0()

Remove outdated sync logs.

public fixForV3_2_0() : mixed
Return values
mixed

fixForV4_2_0()

public fixForV4_2_0() : mixed
Tags
since
4.2.0
Return values
mixed

fixForV4_4_0()

Reverted compatibility with MySQL 5.5 for mphb_customers table

public fixForV4_4_0() : void
Return values
void

fixForV4_5_0()

public fixForV4_5_0() : mixed
Return values
mixed

fixGlobalRule()

public fixGlobalRule() : mixed
Return values
mixed

fixSessionOptions()

public fixSessionOptions() : mixed
Tags
global

\WPDB $wpdb

Return values
mixed

flushRewriteRules()

public flushRewriteRules() : mixed
Return values
mixed

forceUpgrade()

public forceUpgrade() : mixed
Tags
see
ActionsHandler::forceUpgrade()
since
3.7.0
Return values
mixed

getProgress()

public getProgress() : int
Tags
since
3.7.0
Return values
int

getScheduledVersion()

public getScheduledVersion() : string
Return values
string

hideUpgradeNotice()

public hideUpgradeNotice() : mixed
Tags
since
3.7.0
Return values
mixed

improveStats()

Rename all columns from stat_* to import_* and add clean_* columns.

public improveStats() : mixed
Return values
mixed

markImported()

Mark imported bookings in version 3.4.0.

public markImported() : mixed
Return values
mixed

moveSyncUrls()

public moveSyncUrls() : mixed
Return values
mixed

removeOutdatedStripeOptions()

public removeOutdatedStripeOptions() : mixed
Tags
since
3.6.0
Return values
mixed

resetDBVersion()

public resetDBVersion() : mixed
Return values
mixed

setScheduledVersion()

public setScheduledVersion([mixed $version = null ]) : mixed
Parameters
$version : mixed = null
Return values
mixed

showUpgradeNotice()

public showUpgradeNotice() : mixed
Return values
mixed

startAutodeleteOfSyncLogs()

public startAutodeleteOfSyncLogs() : mixed
Tags
since
3.6.1
Return values
mixed

stopSynchronization()

public stopSynchronization() : mixed
Tags
since
4.2.2
Return values
mixed

updateDBVersion()

public updateDBVersion([string $version = null ]) : mixed
Parameters
$version : string = null
Return values
mixed

upgrade()

public upgrade() : mixed
Return values
mixed

upgradeAfterImport()

public upgradeAfterImport() : mixed
Return values
mixed

addDBVersionToHistory()

private addDBVersionToHistory(string $version) : mixed
Parameters
$version : string
Return values
mixed

blockNewBookings()

private blockNewBookings() : mixed
Return values
mixed

changeOptionName()

TODO add support to false value of option

private changeOptionName(string $oldName, string $name) : mixed
Parameters
$oldName : string
$name : string
Return values
mixed

getCurrentDBVersion()

private getCurrentDBVersion([mixed $returnNull = false ]) : string
Parameters
$returnNull : mixed = false
Tags
since
3.5.1

added optional parameter $returnNull.

Return values
string

getQueueSize()

private getQueueSize() : mixed
Return values
mixed

getTotalQueueSize()

private getTotalQueueSize() : mixed
Return values
mixed

setTotalQueueSize()

private setTotalQueueSize(mixed $size) : mixed
Parameters
$size : mixed
Return values
mixed

Search results