Filter
rpress_live_orders_query_args
On this page
Filters the WP_Query arguments used to load orders for the Live Orders board.
The default query selects rpress_payment posts with publish, pending or processing status whose _rpress_delivery_date is today or yesterday. Modify the arguments to narrow or widen the set; the board then groups the results by order status.
Available since RestroPress 3.3.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$args | array | WP_Query arguments. |
Return value#
array. The WP_Query arguments.
Example#
function my_live_orders_query_args( $args ) {
$args['meta_query'][] = array(
'key' => '_rpress_delivery_type',
'value' => 'delivery',
);
return $args;
}
add_filter( 'rpress_live_orders_query_args', 'my_live_orders_query_args' );
Notes#
Only the main query is filtered; the additional query for today's orders without a service date is not.
Source#
Applied in:
includes/admin/payments/class-live-orders.php(line 173), inRP_Live_Orders::get_orders()
See also#
Was this page helpful?
