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


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

enter image description here

Here is the problematic code:

    function sta_pro_first_init(){
    include dirname(__FILE__) . '/license/license.php';
    function sample_admin_notice__success() { ?>
    <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>
    <?php }
    add_action( 'admin_notices', 'sample_admin_notice__success' );
    include dirname(__FILE__) . '/backend/init.php';
    include dirname(__FILE__) . '/frontend/init.php';
    require dirname(__FILE__) . '/updates/plugin-update-checker.php';
    $check_for_updates = Puc_v4_Factory::buildUpdateChecker(
    __FILE__, //Full path to the main plugin file or functions.php.
add_action( 'init', 'sta_pro_first_init' ); ?>

It’s not a compatibility issue with other extensions and I think it’s probably a PHP version issue, what do you think?

Frenchy35 4 weeks 0 Answers 3 views 0

Leave an answer