Thanks guys.
Adding the following to the top of the function should solve the issue:
// ensure is_plugin_active() exists (not on frontend)
if( !function_exists('is_plugin_active') ) {
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
}
Please add this and let me know if it solves the problem for you
Thanks
Elliot