Filter
rpress_order_popup_query_args
On this page
Filters the query arguments that find orders for the new-order popup.
The arguments are passed to get_posts(): rpress_payment posts in the alert payment statuses, newest first, placed within the alert maximum age, returning IDs. Each result is still checked for whether it is alertable, not too old, not scheduled too far ahead and not acknowledged. Keep fields set to ids.
Available since RestroPress 3.5.1.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$args | array | Query arguments. |
$now | int | Unix time of the check. |
Return value#
array. Query arguments.
Example#
add_filter( 'rpress_order_popup_query_args', 'my_popup_query_args', 10, 2 );
function my_popup_query_args( $args, $now ) {
$args['meta_query'] = array(
array(
'key' => '_rpress_delivery_type',
'value' => 'delivery',
),
);
return $args;
}
Source#
Applied in:
includes/features/order-alerts/popup.php(line 189), inRPRESS_Order_Popup::get_order_ids()
See also#
Was this page helpful?
