Skip to content
Docs
Get RestroPress

Filter

rpress_pause_orders_banner_message

Updated
On this page

Filters the banner text shown on the menu and checkout while paused or busy.

Runs in RPRESS_Pause_Orders::banner_message(). The default is built from the current state: a 'not taking orders' message (with a resume time when one is set), an optional pre-order hint, or a busy message. An empty string means no banner is printed. The text is escaped on output.

Parameters#

ParameterTypeDescription
$valuestringBanner text.
$statearrayPause state with keys paused, until, extra_prep and extra_until.

Return value#

string. Banner text, empty for no banner.

Example#

function my_pause_banner( $message, $state ) {
	return $state['paused'] ? __( 'The kitchen is taking a short break.', 'my-plugin' ) : $message;
}
add_filter( 'rpress_pause_orders_banner_message', 'my_pause_banner', 10, 2 );

Source#

Applied in:

  • includes/features/pause-orders/loader.php (line 665), in RPRESS_Pause_Orders::banner_message()

See also#

Was this page helpful?