Just a thought (and one I haven’t had a chance to try out) but you might try wrapping it in the is_plugin_active rather than function_exists. This conditional function will check to make sure a plugin is active before executing the code inside the IF.