Skip to content
Docs
Get RestroPress

Filter

rpress_orders_available_service_types

Updated
On this page

Filters the service types offered in the Orders list service type filter.

The default list is built from the enabled service setting: delivery and pickup, plus dinein when the Dine-in extension is active. Add entries for service types supplied by an extension.

Parameters#

ParameterTypeDescription
$typesarrayAssociative array of service type slug to label.

Return value#

array. The service type options.

Example#

function my_orders_service_types( $types ) {
	$types['curbside'] = esc_html__( 'Curbside', 'my-plugin' );
	return $types;
}
add_filter( 'rpress_orders_available_service_types', 'my_orders_service_types' );

Notes#

Adding a type only adds it to the dropdown; the orders query must also understand the value.

Source#

Applied in:

  • includes/admin/payments/class-payments-table.php (line 1146), in RPRESS_Payment_History_Table::get_available_service_types()

See also#

Was this page helpful?