Skip to content
Docs
Get RestroPress

Filter

rpress_service_types

Updated
On this page

Filters the service type labels used by rpress_service_label().

Used when converting a service slug to its display label. The default array contains delivery and pickup. Add or change entries to control the label shown for a slug.

Parameters#

ParameterTypeDescription
$service_typesarrayService labels keyed by slug.

Return value#

array. Service labels keyed by slug.

Example#

function my_service_labels( $service_types ) {
	$service_types['pickup'] = __( 'Collection', 'my-textdomain' );
	return $service_types;
}
add_filter( 'rpress_service_types', 'my_service_labels' );

Source#

Applied in:

  • includes/rp-core-functions.php (line 1225), in rpress_service_label()

See also#

Was this page helpful?