Skip to content
Docs
Get RestroPress

Filter

rpress_enable_services

Updated
On this page

Filters the list of enabled service slugs.

Built from the Choose Services setting: either delivery and pickup, or the single chosen service. The result is then sanitized with sanitize_key, de-duplicated and re-indexed.

Parameters#

ParameterTypeDescription
$enabled_servicesarrayList of enabled service slugs.

Return value#

array. List of service slugs.

Example#

function my_enabled_services( $enabled_services ) {
	$enabled_services[] = 'dine_in';
	return $enabled_services;
}
add_filter( 'rpress_enable_services', 'my_enabled_services' );

Source#

Applied in:

  • includes/rp-core-functions.php (line 935), in rpress_get_enabled_services()

See also#

Was this page helpful?