If two plugins run a filter/action on any given hook, that given filter or action will be given a priority, default is 10 if i remember correctly, if one filter needs to run first, the only modification you need do is set a higher priority for the filter or action that should run last, and a lower value to run first..
0 - highest priority
10 - default
n - Any numeric value
Third argument sets the priority of the filter or action.
To clarify, each plugin will have various or maybe just one action or filter hook, they look a little something like this..
add_action( 'hook_name', 'callback_name' ); // Default third value of 10
add_action( 'hook_name', 'callback_name', 100 );
add_filter( 'hook_name', 'callback_name' ); // Default third value of 10
add_filter( 'hook_name', 'callback_name', 100 );
Hook name represents the WordPress action or filter hook name, and the callback name represents the name of a function being hooked onto the given hook.
Some actions/filters will not declare a priority (the third parameter - a numeric value), in which case it is given a default value of 10.
If one plugin needs to run on a given hook before another it must have a higher priority then the other.. (example data follows)
Imagine these two lines were taken from files of two different plugins.
add_action( 'the_content', 'example_function' );
add_action( 'the_content', 'another_function' );
Without setting a priority WordPress will simply give them both a priority of 10.
If we wanted to ensure that
another_function runs first we'd modify those two lines to something like..
add_action( 'the_content', 'another_function', 100 );
add_action( 'the_content', 'example_function', 300 );
This way the plugin that contains the
another_function would run first, and the plugin with
example_function would run later ..
Hope that helps clarify..