Skip to content
Docs
Get RestroPress

Action

rpress_payments_table_do_bulk_action

Updated
On this page

Fires for each selected order after a bulk action on the Orders list has been processed.

Runs inside the bulk action loop for every selected order after the built-in switch has handled the action, so it also fires for built-in actions. Use it to handle custom actions added through rpress_payments_table_bulk_actions.

Parameters#

ParameterTypeDescription
$idintThe ID of the order the action is being applied to.
$actionstringThe bulk action key that was submitted.

Example#

function my_handle_bulk_action( $id, $action ) {
	if ( 'my-flag-order' === $action ) {
		update_post_meta( $id, 'my_flagged', 1 );
	}
}
add_action( 'rpress_payments_table_do_bulk_action', 'my_handle_bulk_action', 10, 2 );

Notes#

Only runs after nonce and capability checks (edit_shop_payments, or delete_shop_payments for delete actions) and is skipped for orders the user cannot edit.

Source#

Fired from:

  • includes/admin/payments/actions.php (line 557), in rpress_orders_list_table_process_bulk_actions()

See also#

Was this page helpful?