Skip to content
Docs
Get RestroPress

Filter

rpress_delivery_time_string

Updated
On this page

Filters the delivery time label in the service popup and the delivery template.

Applied to the text shown beside the delivery time selector. The date and time popup uses it for the select-a-time label, and the delivery template uses it for its Delivery time label. The delivery template escapes the result with esc_html().

Parameters#

ParameterTypeDescription
$labelstringDefault label text for the delivery time field.

Return value#

string. The label to show.

Example#

add_filter( 'rpress_delivery_time_string', 'my_delivery_time_label' );
function my_delivery_time_label( $label ) {
	return __( 'Arrival time', 'my-textdomain' );
}

Notes#

The default text differs between the popup and the delivery template, so the callback sees a different input in each.

Source#

Applied in:

  • templates/rpress-datetime-popup.php (line 140)
  • templates/rpress-delivery.php (line 84)

See also#

Was this page helpful?