Filter
rpress_get_users_ordered_products_args
On this page
Filters the query arguments for a user's ordered menu items.
Runs in rpress_get_users_ordered_products() before get_posts() is called. Default arguments are include (unique menu item IDs), post_type fooditem, posts_per_page -1, no_found_rows and cache-update flags set to skip term and meta caches.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$args | array | Arguments passed to get_posts(). |
Return value#
array. Arguments for get_posts().
Example#
function my_ordered_products_args( $args ) {
$args['orderby'] = 'title';
$args['order'] = 'ASC';
return $args;
}
add_filter( 'rpress_get_users_ordered_products_args', 'my_ordered_products_args' );
Source#
Applied in:
includes/user-functions.php(line 151), inrpress_get_users_ordered_products()
See also#
Was this page helpful?
