files_manager->clear_cache(); } } register_activation_hook( EAE_FILE, 'eae_activate' ); // get current file path $current_file_path = __FILE__; $is_pro = false; $active_plugins = get_option( 'active_plugins' ); // Old Free Plugin if(strpos($current_file_path, 'elementor-addon-elements/elementor-addon-elements.php') !== false){ $is_pro = true; if($is_pro){ // free is also active, unset it so that it won't be loaded if(in_array('addon-elements-for-elementor-page-builder/elementor-addon-elements.php', $active_plugins)){ deactivate_plugins('addon-elements-for-elementor-page-builder/elementor-addon-elements.php'); add_action( 'admin_notices', function(){ ?>

' . $button_label . '

'; //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped printf( '

%2$s

%3$s
', 'notice notice-error', $message, $button ); } } add_action( 'plugins_loaded', function(){ if ( ! did_action( 'elementor/loaded' ) ) { /* TO DO */ add_action( 'admin_notices', 'wts_eae_pro_fail_load' ); return; }else{ $active_plugins = get_option( 'active_plugins' ); $current_file_path = __FILE__; $is_pro = false; $php_version = phpversion(); if(strpos($current_file_path, 'elementor-addon-elements/elementor-addon-elements.php') !== false){ // free is also active, unset it so that it won't be loaded $is_pro = true; require_once plugin_dir_path( __FILE__ ) . 'vendor/autoload.php'; require_once plugin_dir_path( __FILE__ ) . 'inc/bootstrap.php'; }else{ if(in_array('elementor-addon-elements/elementor-addon-elements.php', $active_plugins)){ }else{ //require_once EAE_PATH . 'vendor/autoload.php'; require_once plugin_dir_path( __FILE__ ) . 'inc/bootstrap.php'; } } } // check is elementor installed and activated });