How do I modify the position of a plugin?

It’s always bad practise to modify a plugin file. For one thing you will lose your changes when the plugin is updated. Look to see if your plugin has been created with filters (good plugins should be).

Search within your plugin for “apply_filters(” – With luck you will find this near the positional code. It might look something like this:

function cart_display() {
  $html .= '<div style="float-right">Cart position</div>';
return apply_filters( 'cart_display_html', $html );

This code is getting the contents (in the $html variable) ready for display, but also telling it to pass it through a filter called cart_display_html.

Within your functions file you can then hook into this filter to alter the display “on the fly”. Using, for example:

function modify_cart_html( $html ) {
  return '<div>' . $html . '</div>';
}
add_filter( 'cart_display_html', 'modify_cart_html' );

There may well be CSS that can be used as well, likely simply overriding the plugins build in css.