Filter
rpress_available_services
On this page
Filters the choices of the Choose Services setting.
Runs while the settings are registered and builds the radio options of the enable_service setting. The defaults are delivery_and_pickup, delivery and pickup. Other code reading enable_service only knows these values, so changing the keys needs matching handling elsewhere.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$services | array | Array of service value => label. |
Return value#
array. The service value => label array.
Example#
function my_service_labels( $services ) {
$services['delivery'] = esc_html__( 'Delivery only (own riders)', 'my-plugin' );
return $services;
}
add_filter( 'rpress_available_services', 'my_service_labels', 10, 1 );
Source#
Applied in:
includes/admin/settings/register-settings.php(line 809), inrpress_get_registered_settings()
See also#
Was this page helpful?
