' . esc_html__( 'Booking request', 'abientot' ) . '
'; echo '' . esc_html( $this->message_text( $message, $action ) ) . '
'; $this->render_contact_details(); echo 'locations = new LocationsRepository();
}
public function register(): void {
add_action( 'template_redirect', array( $this, 'maybe_render' ) );
}
public function maybe_render(): void {
// Contact-help messages from links in booking emails; display only.
$message = (string) ( \Abientot\Support\Request::view( 'abientot_booking_message', 'key' ) ?? '' );
$action = (string) ( \Abientot\Support\Request::view( 'abientot_booking_action', 'key' ) ?? '' );
$private_link = false;
foreach ( array( 'abientot_portal', 'abientot_series', 'abientot_credits', 'abientot_credit_booking', 'abientot_guardian', 'abientot_waitlist', 'abientot_waitlist_signup' ) as $key ) {
$private_link = $private_link || \Abientot\Support\Request::has_view( $key );
}
// Paid routes render earlier when available; retained links otherwise lead to contact help.
if ( ! $private_link && '' === $message && ! in_array( $action, array( 'cancel', 'reschedule' ), true ) ) {
return;
}
nocache_headers();
header( 'Cache-Control: private, no-store, max-age=0' );
header( 'Referrer-Policy: no-referrer' );
header( 'X-Robots-Tag: noindex, nofollow' );
wp_enqueue_style( 'abientot-frontend' );
get_header();
echo ' ' . esc_html( $this->message_text( $message, $action ) ) . '' . esc_html__( 'Booking request', 'abientot' ) . '
';
echo '