Filter
rpress_store_delivery_timings_slot_remaining
On this page
Filters each order time slot before it is offered to the customer.
Called once per slot when the slot list is normalized and when the delivery, pickup and date/time popup templates render their dropdowns. Return an empty value to remove a slot, or a different scalar to change it. In the slot normalizer a non-scalar or empty result discards the slot.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$slot | string | The time slot text. |
Return value#
string. The slot to display, or an empty string to hide it.
Example#
function my_remove_slot( $slot ) {
if ( '12:00 PM' === $slot ) {
return '';
}
return $slot;
}
add_filter( 'rpress_store_delivery_timings_slot_remaining', 'my_remove_slot' );
Notes#
Fired from rpress_get_available_service_slots() and from three templates with the same signature.
Source#
Applied in:
includes/rp-core-functions.php(line 1284), inrpress_get_available_service_slots()templates/rpress-datetime-popup.php(line 199)templates/rpress-delivery.php(line 115)templates/rpress-pickup.php(line 115)
See also#
Was this page helpful?
