I'm using URL parameters as actions links within a custom WP_List_Table for users like so:
http://domain.com/wp-admin/users.php?page=account-expiration-status&do_action_xyz&email=email%40domain.com&_wpnonce=xyz
Within the parent class, I'm checking for the existence of
array_key_exists( 'do_action_xyz', $_GET )
to trigger the appropriate functions.
This works fine, but unfortunately the $_GET-parameters get added to the paginations links of the table as well. This causes the action to get triggered twice when using the tablenav to browse forward or backward in the table.
I've tried removing the $_GET-parameters right after executing the desired action with both:
unset( $_GET['do_action_xyz'] );
and
remove_query_arg( 'do_action_xyz' );
but WordPress still adds them to the pagination links of the table.
Can anyone help me to remove the query arg correctly after executing the action?