the reason why $_GET[‘_orderby’]is not working, it’s because for filtering, the request is a type of POST + JSON data.
It depends what you need that filtering data for, and what you do with it, but I see two options:
You can use \Bricks\Query_Filters::$active_filters to access current active filters
or
You can increase the priority of your filter to 1000 (or more), and then, the &query_vars will be already merged with the filter, and you will have access to the _orderby part of the query vars. But, you have to be careful, if you will be modifying them, as this will run after merging query vars of filters, so whatever you do, will be the final query_vars.
I’ll also move the topic to How To, as it’s not a bug.
I hope it helps
// Read raw POST data (JSON) from php://input
$json_data = file_get_contents('php://input');
// Decode the JSON data into a PHP array
$data = json_decode($json_data, true);
// Get the 'orderby' value from the GET request
$orderby_get = isset($_GET['_orderby']) ? $_GET['_orderby'] : '';
// Get the 'selectedFilters' from the decoded JSON POST data
$orderby_post = isset($data['selectedFilters']) ? $data['selectedFilters'] : [];