Action
rpress_reservation_admin_save
On this page
Fires when the reservation details box is saved, so extensions can store their fields.
Runs in rpress_reservation_save_details() after the nonce and capability checks and before status changes and notifications. The raw array holds the unslashed rpress_res[] values from the form; sanitize them before saving.
Available since RestroPress 3.5.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$post_id | int | Reservation ID. |
$raw | array | Unslashed rpress_res[] values. |
Example#
function my_reservation_save( $post_id, $raw ) {
if ( isset( $raw['occasion'] ) ) {
update_post_meta( $post_id, 'my_occasion', sanitize_text_field( $raw['occasion'] ) );
}
}
add_action( 'rpress_reservation_admin_save', 'my_reservation_save', 10, 2 );
Source#
Fired from:
includes/features/reservations/admin.php(line 607), inrpress_reservation_save_details()
See also#
Was this page helpful?
