woocommerce_include_processing_order_count_in_menu

woocommerce_include_processing_order_count_in_menu

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

apply_filters('woocommerce_include_processing_order_count_in_menu') is found 1 times:

  • /includes/admin/class-wc-admin-menus.php line 264
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    // Remove 'WooCommerce' sub menu item.
    unset( $submenu['woocommerce'][0] );
     
    // Add count if user has access.
    if ( apply_filters( 'woocommerce_include_processing_order_count_in_menu', true ) && current_user_can( 'edit_others_shop_orders' ) ) {
        $order_count = apply_filters( 'woocommerce_menu_order_count', wc_processing_order_count() );
     
        if ( $order_count ) {
            foreach ( $submenu['woocommerce'] as $key => $menu_item ) {
                if ( 0 === strpos( $menu_item[0], _x( 'Orders', 'Admin menu name', 'woocommerce' ) ) ) {
                    $submenu['woocommerce'][ $key ][0] .= ' <span class="awaiting-mod update-plugins count-' . esc_attr( $order_count ) . '"><span class="processing-count">' . number_format_i18n( $order_count ) . '</span></span>'; // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited