Filter
rpress_service_types
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#
| Parameter | Type | Description |
|---|---|---|
$service_types | array | Service 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), inrpress_service_label()
See also#
Was this page helpful?
