Skip to content
Docs
Get RestroPress

Action

rpress_payment_advanced_filters_after_fields

Updated
On this page

Fires inside the Orders list advanced filters, after the last filter field.

Runs just before the Apply filters and Reset buttons. Output extra filter inputs here; they are part of the same GET form as the built-in filters.

Example#

function my_orders_filter_field() {
	$value = isset( $_GET['my_table'] ) ? sanitize_text_field( wp_unslash( $_GET['my_table'] ) ) : '';
	echo '<div class="rp-filters-field"><label for="my_table">' . esc_html__( 'Table', 'my-plugin' ) . '</label>';
	echo '<input type="text" id="my_table" name="my_table" value="' . esc_attr( $value ) . '"></div>';
}
add_action( 'rpress_payment_advanced_filters_after_fields', 'my_orders_filter_field' );

Notes#

No arguments are passed. Applying your filter to the query is separate work, for example via the orders query arguments.

Source#

Fired from:

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

See also#

Was this page helpful?