Filter
rpress_store_closed_message
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#
| Parameter | Type | Description |
|---|---|---|
$close_message | string | Closed-store message. |
$service_type | string | Service 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), inrpress_store_closed_message()
See also#
Was this page helpful?
