Skip to content
Docs
Get RestroPress

Filter

rpress_reservation_has_table_booking

Updated
On this page

Filters whether the Table Booking extension counts as active.

Returned by rpress_reservation_has_table_booking(). It is true when the RP_TB_VERSION constant is defined or the RP_Tablebooking class exists, and it is used to hide the Table Booking upsell. Return true to hide the upsell, or false to show it.

Parameters#

ParameterTypeDescription
$valueboolWhether the Table Booking extension is active.

Return value#

bool. True when the upsell should be hidden.

Example#

function my_reservation_has_table_booking( $active ) {
	return true;
}
add_filter( 'rpress_reservation_has_table_booking', 'my_reservation_has_table_booking' );

Notes#

The first parameter is an expression that evaluates to a bool.

Source#

Applied in:

  • includes/features/reservations/functions.php (line 94), in rpress_reservation_has_table_booking()
Was this page helpful?