## Fatal error “Call to undefined function is_plugin_active” each time the plugin is activated

Question

I try to activate an extension in WordPress, but I get an error every time I try to activate it:

Here is the problematic code:

    function sta_pro_first_init(){
if(!is_plugin_active('scroll-triggered-animations/toaststa.php')):
<div class="notice notice-error">
<p>Scroll Triggered Animations Pro has had a major update and now requires the foundation plugin. Please download and install <a href="https://wordpress.org/plugins/scroll-triggered-animations/" target="_blank">here</a> to carry on using STA.</p>
</div>
<?php }

include dirname(__FILE__) . '/backend/init.php';
include dirname(__FILE__) . '/frontend/init.php';