woocommerce_bulk_action_ids хук-фильтрWC 1.0

Allows 3rd parties to modify order IDs about to be affected by a bulk action.

Использование

add_filter( 'woocommerce_bulk_action_ids', 'wp_kama_woocommerce_bulk_action_ids_filter', 10, 3 );

/**
 * Function for `woocommerce_bulk_action_ids` filter-hook.
 * 
 * @param array $ids    Array of order IDs.
 * @param       $action 
 * @param       $string 
 *
 * @return array
 */
function wp_kama_woocommerce_bulk_action_ids_filter( $ids, $action, $string ){

	// filter...
	return $ids;
}
$ids(массив)
Array of order IDs.
$action
-
$string
-

Где вызывается хук

ListTable::handle_bulk_actions()
woocommerce_bulk_action_ids
WC_Admin_List_Table_Orders::handle_bulk_actions()
woocommerce_bulk_action_ids
woocommerce/src/Internal/Admin/Orders/ListTable.php 1325-1330
$ids = apply_filters( // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingSinceComment
	'woocommerce_bulk_action_ids',
	$ids,
	$action,
	'order'
);
woocommerce/includes/admin/list-tables/class-wc-admin-list-table-orders.php 451
$ids     = apply_filters( 'woocommerce_bulk_action_ids', array_reverse( array_map( 'absint', $ids ) ), $action, 'order' );

Где используется хук в WooCommerce

Использование не найдено.