Filter
rpress_payments_table_bulk_actions
On this page
Filters the bulk actions available in the Orders list.
Returns the dropdown options as action key to label. The default set is restore and delete_permanently when viewing Trash, and payment status, trash, delete, order status and resend receipt actions otherwise. Handle custom actions with rpress_payments_table_do_bulk_action.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$actions | array | Associative array of bulk action key to label. |
$status | string | The current list status view, for example trash. |
Return value#
array. The bulk actions.
Example#
function my_orders_bulk_actions( $actions, $status ) {
if ( 'trash' !== $status ) {
$actions['my-flag-order'] = esc_html__( 'Flag Order', 'my-plugin' );
}
return $actions;
}
add_filter( 'rpress_payments_table_bulk_actions', 'my_orders_bulk_actions', 10, 2 );
Notes#
Applied in two places in get_bulk_actions(): the trash view list and the default list. The signature is the same.
Source#
Applied in:
includes/admin/payments/class-payments-table.php(line 2286), inRPRESS_Payment_History_Table::get_bulk_actions()includes/admin/payments/class-payments-table.php(line 2308), inRPRESS_Payment_History_Table::get_bulk_actions()
See also#
Was this page helpful?
