Skip to content
Docs
Get RestroPress

Filter

rpress_reservation_success_message

Updated
On this page

Filters the message shown on the reservation success screen.

Runs in the [rpress_reservation] shortcode when the page is loaded with rpress_reservation=received. The default text depends on whether the reservation is confirmed or still pending. The message is output through esc_html(), so it must be plain text. The reservation is only passed when the rid and rkey in the URL verify.

Available since RestroPress 3.5.

Parameters#

ParameterTypeDescription
$messagestringPlain text message.
$statusstringReservation status slug.
$arg3array|falseReservation as returned by rpress_get_reservation(), or false when the link does not verify.

Return value#

string. The plain text message to show.

Example#

function my_reservation_success_message( $message, $status, $res ) {
	if ( $res && 'pending' === $status ) {
		return sprintf( 'Thanks %s, we will confirm your table shortly.', $res['name'] );
	}
	return $message;
}
add_filter( 'rpress_reservation_success_message', 'my_reservation_success_message', 10, 3 );

Notes#

Third argument is an expression: the reservation array when the link verifies, otherwise false.

Source#

Applied in:

  • includes/features/reservations/frontend.php (line 316), in rpress_reservation_shortcode()

See also#

Was this page helpful?