PaymentStatuses extends AbstractPostStatuses
in package

Tags
since
1.5.0

Table of Contents

STATUS_ABANDONED  = 'abandoned'
STATUS_AUTO_DRAFT  = 'auto-draft'
STATUS_CANCELLED  = 'cancelled'
STATUS_COMPLETED  = 'completed'
STATUS_DRAFT  = 'draft'
STATUS_FAILED  = 'failed'
STATUS_NEW  = 'new'
STATUS_ON_HOLD  = 'on-hold'
STATUS_PENDING  = 'pending'
STATUS_PUBLISH  = 'publish'
STATUS_REFUNDED  = 'refunded'
STATUS_TRASH  = 'trash'
$entityType  : string
$postType  : string
$statuses  : array<string|int, mixed>
__construct()  : mixed
getBlockerStatuses()  : array<string|int, mixed>
getCompletedStatuses()  : array<string|int, mixed>
getDefaultManualStatus()  : string
getFailedStatuses()  : array<string|int, mixed>
getLabel()  : string
getLabels()  : array<string|int, mixed>
getManualStatuses()  : array<string|int, mixed>
getNonblockerStatuses()  : array<string|int, mixed>
getPendingStatuses()  : array<string|int, mixed>
hasStatus()  : bool
registerStatuses()  : mixed
transitionStatus()  : mixed
addActions()  : mixed
finishTransition()  : mixed
initStatuses()  : mixed
isNewPost()  : bool
logTransition()  : mixed
notifyTransition()  : mixed
updateBooking()  : mixed
updatePendingTime()  : mixed

Constants

STATUS_ABANDONED

public mixed STATUS_ABANDONED = 'abandoned'
Tags
since
1.5.0

STATUS_AUTO_DRAFT

public mixed STATUS_AUTO_DRAFT = 'auto-draft'
Tags
since
1.0

STATUS_CANCELLED

public mixed STATUS_CANCELLED = 'cancelled'
Tags
since
1.5.0

STATUS_COMPLETED

public mixed STATUS_COMPLETED = 'completed'
Tags
since
1.5.0

STATUS_DRAFT

public mixed STATUS_DRAFT = 'draft'
Tags
since
1.13.0

STATUS_FAILED

public mixed STATUS_FAILED = 'failed'
Tags
since
1.5.0

STATUS_NEW

public mixed STATUS_NEW = 'new'
Tags
since
1.0

STATUS_ON_HOLD

public mixed STATUS_ON_HOLD = 'on-hold'
Tags
since
1.5.0

STATUS_PENDING

public mixed STATUS_PENDING = 'pending'
Tags
since
1.5.0

STATUS_PUBLISH

public mixed STATUS_PUBLISH = 'publish'
Tags
since
1.0

STATUS_REFUNDED

public mixed STATUS_REFUNDED = 'refunded'
Tags
since
1.5.0

STATUS_TRASH

public mixed STATUS_TRASH = 'trash'
Tags
since
1.0

Properties

$entityType

protected string $entityType
Tags
since
1.0

$postType

protected string $postType
Tags
since
1.0

$statuses

protected array<string|int, mixed> $statuses = []
Tags
since
1.0

Methods

__construct()

public __construct(string $postType) : mixed
Parameters
$postType : string
Tags
since
1.0
Return values
mixed

getBlockerStatuses()

public getBlockerStatuses() : array<string|int, mixed>
Tags
since
1.0
Return values
array<string|int, mixed>

[Status => Label]

getCompletedStatuses()

public getCompletedStatuses() : array<string|int, mixed>
Tags
since
1.5.0
Return values
array<string|int, mixed>

[Status => Label]

getDefaultManualStatus()

public getDefaultManualStatus() : string
Tags
since
1.5.0
Return values
string

getFailedStatuses()

public getFailedStatuses() : array<string|int, mixed>
Tags
since
1.5.0
Return values
array<string|int, mixed>

[Status => Label]

getLabel()

public getLabel(string $status) : string
Parameters
$status : string
Tags
since
1.0
Return values
string

getLabels()

public getLabels(array<string|int, string> $statuses) : array<string|int, mixed>
Parameters
$statuses : array<string|int, string>
Tags
since
1.0
Return values
array<string|int, mixed>

[Status => Label]

getManualStatuses()

public getManualStatuses() : array<string|int, mixed>
Tags
since
1.0
Return values
array<string|int, mixed>

[Status => Label]

getNonblockerStatuses()

public getNonblockerStatuses() : array<string|int, mixed>
Tags
since
1.0
Return values
array<string|int, mixed>

[Status => Label]

getPendingStatuses()

public getPendingStatuses() : array<string|int, mixed>
Tags
since
1.5.0
Return values
array<string|int, mixed>

[Status => Label]

hasStatus()

public hasStatus(string $status) : bool
Parameters
$status : string
Tags
since
1.0
Return values
bool

registerStatuses()

public registerStatuses() : mixed
Tags
access

protected

since
1.0
Return values
mixed

transitionStatus()

public transitionStatus(string $newStatus, string $oldStatus, WP_Post $post) : mixed
Parameters
$newStatus : string
$oldStatus : string
$post : WP_Post
Tags
access

protected

since
1.0
Return values
mixed

addActions()

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

finishTransition()

protected finishTransition(string $newStatus, string $oldStatus, Payment $payment) : mixed
Parameters
$newStatus : string
$oldStatus : string
$payment : Payment
Tags
since
1.5.0
Return values
mixed

initStatuses()

protected initStatuses() : mixed
Tags
since
1.5.0
Return values
mixed

isNewPost()

protected isNewPost(string $oldStatus) : bool
Parameters
$oldStatus : string
Tags
since
1.0
Return values
bool

logTransition()

protected logTransition(string $newStatus, string $oldStatus, Payment $payment) : mixed
Parameters
$newStatus : string
$oldStatus : string
$payment : Payment
Tags
since
1.5.0
Return values
mixed

notifyTransition()

protected notifyTransition(string $newStatus, string $oldStatus, AbstractEntity $entity) : mixed
Parameters
$newStatus : string
$oldStatus : string
$entity : AbstractEntity
Tags
since
1.0
todo

Add support of status 'trash'.

Return values
mixed

updateBooking()

protected updateBooking(Booking $booking, Payment $payment) : mixed
Parameters
$booking : Booking
$payment : Payment
Tags
since
1.5.0
since
1.6.0

Added processing of refunded payment status

Return values
mixed

updatePendingTime()

protected updatePendingTime(Payment $payment, string $newStatus, string $oldStatus) : mixed
Parameters
$payment : Payment
$newStatus : string
$oldStatus : string
Tags
since
1.5.0
Return values
mixed

Search results