Filter
restropress_admin_order_preview_actions
On this page
Filters the action buttons shown in the order preview modal.
The array is rendered by rp_render_action_buttons(): top-level entries with name, action, payment_id and url keys are printed as buttons. Entries that have a group key (such as the default status group) are skipped.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$actions | array | Array of action definitions. |
$payment | RPRESS_Payment | The payment object being previewed. |
Return value#
array. The actions array.
Example#
function my_order_preview_actions( $actions, $payment ) {
$actions['my_view'] = array(
'name' => esc_html__( 'Open', 'my-plugin' ),
'payment_id' => $payment->ID,
'action' => 'my-open',
'url' => admin_url( 'admin.php?page=rpress-payment-history&view=view-order-details&id=' . $payment->ID ),
);
return $actions;
}
add_filter( 'restropress_admin_order_preview_actions', 'my_order_preview_actions', 10, 2 );
Notes#
The hook name uses the prefix restropress_ rather than rpress_.
Source#
Applied in:
includes/admin/payments/class-payments-table.php(line 3003), inRPRESS_Payment_History_Table::get_order_preview_actions_html()
See also#
Was this page helpful?
