woocommerce_menu_order_count

woocommerce_menu_order_count

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_menu_order_count') is found 1 times:

  • /includes/admin/class-wc-admin-menus.php line 258
    			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
    							break;