Skip to content
Docs
Get RestroPress

Filter

rpress_users_purchased_products_list

Updated
On this page

Filters the list of menu items a user has ordered.

Runs at the end of rpress_get_users_ordered_products() with the get_posts() result.

Parameters#

ParameterTypeDescription
$productsWP_Post[]Menu items the user has ordered.

Return value#

WP_Post[]. List of menu item posts.

Example#

function my_ordered_products_list( $products ) {
	return array_slice( $products, 0, 10 );
}
add_filter( 'rpress_users_purchased_products_list', 'my_ordered_products_list' );

Source#

Applied in:

  • includes/user-functions.php (line 162), in rpress_get_users_ordered_products()

See also#

Was this page helpful?