Filter
rpress_order_eta_minutes
On this page
Filters the minutes from order placement to arrival or ready time for ASAP orders.
Used by rpress_get_order_eta() when the order has no requested time or its time text contains ASAP. The default is the longest wait found in that text (for example 20 from "15-20 min"), otherwise the prep_time setting. The minutes are added to the time the order was placed. A result of 0 or less means no estimate. The estimate is used on the order details page.
Available since RestroPress 3.5.1.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$minutes | int | Minutes from placement. |
$payment_id | int | Order (payment) ID. |
$service | string | Stored service type, such as 'delivery' or 'pickup'. May be empty. |
Return value#
int. Minutes from placement.
Example#
add_filter( 'rpress_order_eta_minutes', 'my_order_eta_minutes', 10, 3 );
function my_order_eta_minutes( $minutes, $payment_id, $service ) {
if ( 'delivery' === $service ) {
$minutes += 10;
}
return $minutes;
}
Notes#
Not applied to scheduled orders, which use the requested date and time.
Source#
Applied in:
includes/features/checkout-flow/functions.php(line 280), inrpress_get_order_eta()
See also#
Was this page helpful?
