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.
- Create a file named
00-dicky-woocommerce-bulk-failsafe.phpin your/wp-content/mu-plugins/directory.- If the
mu-pluginsdirectory doesn't exist, create it inside/wp-content/.
- If the
- 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.