File is executed twice if plugin is activating


I have an issue with my plugin. I run an function if the plugin is activating this function include a file. But if I activate the plugin the file is included twice. Is this normal or an bug in WordPress? Is there an solution for this?

In the main file I do this

if ( file_exists ( dirname( __FILE__ ) . '/autoload/autoloader.php' ) )
    require_once dirname( __FILE__ ) . '/autoload/autoloader.php';
Jop 2 years 2020-12-29T15:10:48-05:00 0 Answers 3 views 0

Leave an answer