Skip to content
Docs
Get RestroPress

Filter

rpress_reservation_statuses

Updated
On this page

Filters the list of reservation statuses.

Returned by rpress_reservation_statuses(). The array maps status slug to label and defaults to pending, confirmed, declined, cancelled and completed. Statuses added here are accepted by rpress_set_reservation_status() and the initial status filter, but core only holds seats for the statuses in rpress_reservation_active_statuses.

Parameters#

ParameterTypeDescription
$valuearrayStatus slug => label.

Return value#

array. Status slug => label.

Example#

function my_reservation_statuses( $statuses ) {
	$statuses['awaiting_payment'] = __( 'Awaiting payment', 'my-plugin' );
	return $statuses;
}
add_filter( 'rpress_reservation_statuses', 'my_reservation_statuses' );

Notes#

The first parameter is an inline array of the five default statuses.

Source#

Applied in:

  • includes/features/reservations/functions.php (line 65), in rpress_reservation_statuses()

See also#

Was this page helpful?