Fail-Safe: Ensure WooCommerce Bulk Actions Never Disappear for Shop Managers

Understand the MU-plugin that restores order-status choices for Shop Managers on the HPOS screen, with practical verification and removal guidance.

Start reading
Illustrated cover about Missing WooCommerce Bulk Actions: MU-Plugin Scope, with text on the left and a portrait on the right.

Have you ever encountered a situation where the checkboxes or "Bulk Actions" dropdown on the WooCommerce Orders page suddenly disappear for your Shop Managers? A plugin changing the action list is one possible cause. Missing permissions, a different order screen or an interface issue can produce similar symptoms.

The snippet below adds two status choices for targeted roles on a particular order screen. Its practical purpose is to help staff process orders without immediately replacing plugins or changing the order-storage system.

The Fail-Safe Snippet (MU-Plugin Method)

One way to install this is as a Must-Use Plugin (MU-Plugin). This ensures the code runs before normal plugins and does not have the normal plugin-list deactivation control.

  1. Create a file named 00-dicky-woocommerce-bulk-failsafe.php in your /wp-content/mu-plugins/ directory.
    • If the mu-plugins directory doesn't exist, create it inside /wp-content/.
  2. Paste the following code into that file:
<?php
/**
 * Snippet Name: WooCommerce Bulk Action Fail-Safe
 * Description: Forces bulk actions (like 'Edit') to appear for Shop Managers even if other plugins try to unset them.
 * Version: 1.0.0
 * Author: Dicky Ibrohim
 * Author URI: https://www.dickyibrohim.com
 */

// We use a very high priority (9999) to ensure this runs LAST, restoring what others might have removed.
add_filter('bulk_actions-woocommerce_page_wc-orders', function ($actions) {

    // 1. Safety Check: Get current user
    $u = wp_get_current_user();
    if (!$u || empty($u->roles)) return $actions;

    // 2. Define Target Roles (Adjust as needed)
    $target_roles = array('shop_manager'); // You can add custom roles here
    $is_target = (bool) array_intersect($target_roles, $u->roles);

    // If not the target role, exit early
    if (!$is_target) return $actions;

    // 3. The Fail-Safe Condition
    // If a plugin has cleared the actions, initialize as an empty array
    if (!is_array($actions) || empty($actions)) {
        $actions = array();
    }

    // 4. Restore Essentials
    // We manually add the status change actions.
    // Existence of keys here forces the Checkbox UI to render.
    $actions['mark_processing'] = __('Change status to processing', 'woocommerce');
    $actions['mark_completed']  = __('Change status to completed', 'woocommerce');

    return $actions;

}, 9999);

What the Code Actually Changes

Think of the bulk-actions dropdown as a list of tasks staff can perform on selected orders. This code inserts the processing and completed status choices. It does not grant new permissions or fix every possible cause of missing checkboxes.

The filter targets the WooCommerce HPOS order screen. HPOS stores orders in dedicated WooCommerce tables; the legacy order screen has a different screen ID. Confirm the screen being used before interpreting the result. See the WooCommerce HPOS guide.

Role matching decides who receives the additional actions. A user with shop_manager is a target; accounts with multiple roles should also be checked. Both choices are assigned into $actions again, rather than only when the whole list is empty. Priority 9999 runs later than lower-priority callbacks, but another callback can still run afterwards.

Verify It Without Disrupting Customer Orders

Start on a test copy of the store, using an account with the affected staff role. Check that both choices appear and that the status change is permitted. Order transitions can trigger emails or other processes, so use safe test orders.

If the dropdown is still missing, investigate permissions, interface customizations and the actual screen. Disabling HPOS should not be the default response to an interface symptom. The WordPress bulk-actions filter documentation explains how the filter relates to the screen ID.

Removing the MU-plugin file stops this customization. It does not undo order status changes that have already happened. MU-plugins are not deactivated through the ordinary plugin list; see the WordPress MU-plugin documentation.

For an inherited store, a small repair should leave a clear record of its cause, code location and verification steps. The next team needs to continue the work without guessing. When a customization is delivered through a shortcode, Shortcode Hunter can help trace its source.

Updated

Sources and documentation

Report a correction or outdated information

End of note. Back to top
All notes
  1. 01

    How to Find the Source Code of Any WordPress Shortcode

    Trace shortcode callbacks with the Shortcode Hunter MU-plugin. Understand PHP Reflection, file-scan results, request differences and diagnostic limits.

    Read note
  2. 02

    Website Infected? Find the Cause, Not Just the Visible Malware

    Website malware removal for WordPress, WooCommerce, VPS and other self-hosted sites. Understand redirects, Japanese keyword hacks, rogue admins and checkout risks.

    Read note