Skip to content
Docs
Get RestroPress

Filter

rpress_payments_table_views

Updated
On this page

Filters the status view links shown above the Orders list.

The array holds the segmented tabs (all, needs_attention, new, preparing, ready, completed and trash) as HTML anchor strings with counts. The Trash tab is omitted when empty. Add or remove entries to change the tabs.

Parameters#

ParameterTypeDescription
$viewsarrayAssociative array of view key to HTML link string.

Return value#

array. The views array.

Example#

function my_orders_views( $views ) {
	$url = add_query_arg( 'order_status', 'cancelled' );
	$views['cancelled'] = '<a href="' . esc_url( $url ) . '">' . esc_html__( 'Cancelled', 'my-plugin' ) . '</a>';
	return $views;
}
add_filter( 'rpress_payments_table_views', 'my_orders_views' );

Source#

Applied in:

  • includes/admin/payments/class-payments-table.php (line 1291), in RPRESS_Payment_History_Table::get_views()

See also#

Was this page helpful?