For example plugin needs to pass the order dynamically it can be done by using global variables.Sample code to change the order by using posts_orderby_request filter
.
global $corder;
$corder = 'asc';
add_filter( 'posts_orderby_request',function(){
global $corder;
$val = " wp_posts.post_title $corder";
return $val;
}
);