Skip to content
Docs
Get RestroPress

Filter

rpress_include_pending_order_count_in_menu

Updated
On this page

Filters whether the pending order count badge is shown on the Orders admin menu item.

Checked in RP_Admin_Menus::menu_order_count() while the RestroPress admin menu is being finalized. When true and the current user can edit_shop_payments, the count of orders needing attention is appended to the Orders submenu label as a badge. Return false to remove the badge and skip the count query.

Parameters#

ParameterTypeDescription
$include_countboolWhether to show the badge. Defaults to true.

Return value#

bool. True to show the pending order badge, false to hide it.

Example#

add_filter( 'rpress_include_pending_order_count_in_menu', '__return_false' );

Source#

Applied in:

  • includes/admin/admin-pages.php (line 124), in RP_Admin_Menus::menu_order_count()

See also#

Was this page helpful?