Action
rpress_reservation_insert_meta
On this page
Fires while a new reservation is saved, to store extension data.
Runs inside the insert routine after the reservation post and its core meta are saved, while the per-date lock is still held. Table assignment or other capacity-sensitive work done here cannot race another booking. The raw input includes any fields added through rpress_reservation_submit_data.
Available since RestroPress 3.5.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$id | int | Reservation ID. |
$data | array | Validated core fields. |
$input | array | Raw input, including extension fields. |
$args | array | Insert arguments: validate, status and source. |
Example#
function my_reservation_insert_meta( $id, $data, $input, $args ) {
if ( isset( $input['my_seating'] ) ) {
update_post_meta( $id, '_my_seating', sanitize_key( $input['my_seating'] ) );
}
}
add_action( 'rpress_reservation_insert_meta', 'my_reservation_insert_meta', 10, 4 );
Notes#
Fires before rpress_reservation_created, which is where the emails are sent.
Source#
Fired from:
includes/features/reservations/functions.php(line 583), inrpress_reservation_insert_locked()
See also#
Was this page helpful?
