handle_bulk_actions-(screen_id)
This action is documented in /wp-admin/edit.php (it is a core WordPress hook).
Usage
add_filter( 'handle_bulk_actions-(screen_id)', 'wp_kama_handle_bulk_actions_screen_id_filter', 10, 3 );
/**
* Function for `handle_bulk_actions-(screen_id)` filter-hook.
*
* @param string $redirect_to The URL to redirect to after processing the bulk actions.
* @param string $action The current bulk action.
* @param int[] $ids IDs for the orders to be processed.
*
* @return string
*/
function wp_kama_handle_bulk_actions_screen_id_filter( $redirect_to, $action, $ids ){
// filter...
return $redirect_to;
}
- $redirect_to(string)
- The URL to redirect to after processing the bulk actions.
- $action(string)
- The current bulk action.
- $ids(int[])
- IDs for the orders to be processed.
Changelog
| Since 7.2.0 | Introduced. |
Where the hook is called
handle_bulk_actions-(screen_id)
woocommerce/src/Internal/Admin/Orders/ListTable.php 1497
$custom_sendback = apply_filters( "handle_bulk_actions-{$screen}", $redirect_to, $action, $ids ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
Where the hook is used in WooCommerce
woocommerce/includes/admin/list-tables/abstract-class-wc-admin-list-table.php 52
add_filter( 'handle_bulk_actions-edit-' . $this->list_table_type, array( $this, 'handle_bulk_actions' ), 10, 3 );
woocommerce/src/Internal/Fulfillments/FulfillmentsRenderer.php 65
add_filter( 'handle_bulk_actions-woocommerce_page_wc-orders', array( $this, 'handle_fulfillment_bulk_actions' ), 10, 3 );
woocommerce/src/Internal/Fulfillments/FulfillmentsRenderer.php 72
add_filter( 'handle_bulk_actions-edit-shop_order', array( $this, 'handle_fulfillment_bulk_actions' ), 10, 3 );