Filter
rpress_reservation_success_summary
On this page
Filters the HTML summary shown on the reservation success screen.
Runs in the [rpress_reservation] shortcode right after rpress_reservation_success_message. The default is a definition list with date, time and number of guests, and it is empty when the link does not verify. The value is printed as HTML without further escaping, so callbacks must escape their own values.
Available since RestroPress 3.5.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$summary | string | HTML summary, empty when the link does not verify. |
$arg2 | array|false | Reservation as returned by rpress_get_reservation(), or false when the link does not verify. |
Return value#
string. The HTML summary to output.
Example#
function my_reservation_success_summary( $summary, $res ) {
if ( $res && '' !== $res['note'] ) {
$summary .= '<p>' . esc_html( $res['note'] ) . '</p>';
}
return $summary;
}
add_filter( 'rpress_reservation_success_summary', 'my_reservation_success_summary', 10, 2 );
Notes#
Second argument is an expression: the reservation array when the link verifies, otherwise false. The docblock in the source describes this hook together with the message filter.
Source#
Applied in:
includes/features/reservations/frontend.php(line 317), inrpress_reservation_shortcode()
See also#
Was this page helpful?
