WordPress filter hook
woocommerce_bulk_action_ids
Defined by WooCommerce and fired by 9 plugins in total, running on 7.1M+ sites between them.
“Allows 3rd parties to modify order IDs about to be affected by a bulk action.”
How to use woocommerce_bulk_action_ids
It's a filter: your callback receives the value and 2 more arguments, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_bulk_action_ids', function( $reverse, $action, $arg3 ) {
// Change $reverse here.
return $reverse;
}, 10, 3 );Argument names come from Germanized for WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
9 plugins that fire woocommerce_bulk_action_ids
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'woocommerce_bulk_action_ids', $ids, $action, 'order' )src/Internal/Admin/Orders/ListTable.php:1467 -
Germanized for WooCommerce70,000+ installs
apply_filters( 'woocommerce_bulk_action_ids', array_reverse( array_map( 'absint', $ids ) ), $action, 'order' )packages/eu-order-withdrawal-button-for-woocommerce/src/Admin/Admin.php:572 -
Packlink PRO for WooCommerce20,000+ installs
apply_filters( 'woocommerce_bulk_action_ids', array_values( array_map( 'absint', $ids ) ), $action, 'order' )Controllers/class-packlink-order-overview-controller.php:455 -
Colissimo shipping methods for WooCommerce10,000+ installs
apply_filters( 'woocommerce_bulk_action_ids', array_reverse(array_map('absint', $ids)), $action, 'order' )src/Classes/Order/TableBulkActions.php:91 -
Shiptastic for WooCommerce10,000+ installs
apply_filters( 'woocommerce_bulk_action_ids', array_reverse( array_map( 'absint', $ids ) ), $action, 'order' )src/Admin/Admin.php:1807 -
EU Order Withdrawal Button for WooCommerce6,000+ installs
apply_filters( 'woocommerce_bulk_action_ids', array_reverse( array_map( 'absint', $ids ) ), $action, 'order' )src/Admin/Admin.php:572 -
Deposits & Partial Payments for WooCommerce5,000+ installs
apply_filters( 'woocommerce_bulk_action_ids', array_reverse( array_map( 'absint', $ids ) ), $action, 'order' )includes/class-awcdp-list.php:675 -
EU Consumer Rights for WooCommerce200+ installs
apply_filters( 'woocommerce_bulk_action_ids', array_reverse( array_map( 'absint', $ids ) ), $action, 'order' )withdrawal/src/Admin/Admin.php:954 -
DEPART10+ installs
apply_filters( 'woocommerce_bulk_action_ids', array_reverse( array_map( 'absint', $ids ) ), $action, 'order' )inc/list-table-suborder.php:660
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.