Skip to content
Docs
Get RestroPress

Action

rpress_reservation_admin_details

Updated
On this page

Fires inside the reservation details box so extensions can print extra rows.

Runs in rpress_reservation_details_box() while the details table is open, after the built-in fields. Print complete tr rows and save their values on rpress_reservation_admin_save. The reservation array comes from rpress_get_reservation(), or false when a new reservation is being created.

Available since RestroPress 3.5.

Parameters#

ParameterTypeDescription
$arg1intReservation ID.
$resarray|falseReservation, false for a new one.

Example#

function my_reservation_details( $post_id, $res ) {
	$value = $res ? get_post_meta( $post_id, 'my_occasion', true ) : '';
	echo '<tr><th>' . esc_html__( 'Occasion', 'my-plugin' ) . '</th><td><input type="text" name="rpress_res[occasion]" value="' . esc_attr( $value ) . '"></td></tr>';
}
add_action( 'rpress_reservation_admin_details', 'my_reservation_details', 10, 2 );

Source#

Fired from:

  • includes/features/reservations/admin.php (line 533), in rpress_reservation_details_box()

See also#

Was this page helpful?