Filter
rpress_include_pending_order_count_in_menu
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#
| Parameter | Type | Description |
|---|---|---|
$include_count | bool | Whether 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), inRP_Admin_Menus::menu_order_count()
See also#
Was this page helpful?
