eo_register_booking_status
since 1.6.0
Pro
eo_register_booking_status( $status, $args = array() )
Register a booking status. Do not use before init.
Optional $args
contents:
- label - A name for the booking status. Defaults to
$status
.
- label_count - The text to display on the admin screen (or you won't see your status count). Array should be in the same format as _n_noop() output.
- include_in_confirmed - Whether bookings of this status should be considered 'confirmed'.
- reserve_spaces - Whether tickets in this booking should be reserved, preventing another user purchasing the ticket.
- show_in_admin_all_list - Whether to include bookings in the admin bookings view. Defaults to true.
- show_in_admin_status_list - Show in the list of statuses with post counts at the top of the edit
listings, e.g. All (12) | Confirmed (9) | Pending (1) | My Custom Status (2) ...
- public - Whether bookings of this status should be shown in the front end of the site. Defaults to false.
Please note that even if include_in_confirmed
is set to true
, confirmation e-mails are only sent
when the booking has status 'confirmed'.
Example
function register_my_deposit_paid_status(){
eo_register_booking_status( 'deposit-paid', array(
'label' => 'Deposit paid',
'label_count' => _n_noop( 'Deposit Paid <span class="count">(%s)</span>', 'Deposit Paid <span class="count">(%s)</span>'),
'reserve_spaces' => true,
'reserve_spaces' => true,
'include_in_confirmed' => false,
'public' => true,
));
}
add_action( 'init', 'register_my_deposit_paid_status' );
Parameters
string
|
$status |
Identifier the status.
|
array
|
$args = array() |
See above description.
|
Changelog
Related
Resources