Filter – apto/interface_query_args
The filter allow to change arguments for the query which output the objects in a sort list. The filter send through 2 argument: $args $current_sort_view_ID The following code exclude all hidden WooCommerce products which are set to Visibility Hidden, for a sort id 114: