Filter
rpress_mobile_ordering_store_state
On this page
Filters the store card state shown above the menu.
The state describes one service. Keys are 'service', 'open', 'status', 'next_open', 'can_schedule' and 'chips'. The chips are short facts such as preparation time, delivery fee and minimum order.
Available since RestroPress 3.5.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$state | array | Card state. |
$service | string | Service slug. |
Return value#
array. Card state.
Example#
add_filter( 'rpress_mobile_ordering_store_state', 'my_store_state', 10, 2 );
function my_store_state( $state, $service ) {
if ( 'delivery' === $service ) {
$state['chips'][] = __( 'Contactless delivery', 'my-plugin' );
}
return $state;
}
Source#
Applied in:
includes/features/mobile-ordering/functions.php(line 222), inrpress_mobile_ordering_store_state()
Was this page helpful?
