Skip to content
Docs
Get RestroPress

Filter

rpress_store_closed_message

Updated
On this page

Filters the message shown when the store is closed for ordering.

Runs in rpress_store_closed_message(). The default comes from the store_closed_msg setting, falling back to a translated 'Sorry, we are closed for ordering now.' string. Use it to vary the text per service type.

Parameters#

ParameterTypeDescription
$close_messagestringClosed-store message.
$service_typestringService type the message is for.

Return value#

string. The message to display.

Example#

function my_store_closed_message( $close_message, $service_type ) {
	if ( 'delivery' === $service_type ) {
		return __( 'Delivery has finished for today. Pickup may still be available.', 'my-plugin' );
	}
	return $close_message;
}
add_filter( 'rpress_store_closed_message', 'my_store_closed_message', 10, 2 );

Source#

Applied in:

  • includes/rp-core-functions.php (line 2999), in rpress_store_closed_message()

See also#

Was this page helpful?