getMessage()); } } }, 11, 0); // The priority of this hook must be larger than 10 for the runtime requirement check to detect older versions of WPSTAGING. register_activation_hook($pluginFilePath, function () use ($pluginFilePath) { // Unused $pluginFilePath: Other code will fail if removed it try { require __DIR__ . '/runtimeRequirements.php'; require_once __DIR__ . '/bootstrap.php'; require_once __DIR__ . '/install.php'; } catch (Exception $e) { if (defined('WPSTG_DEBUG') && WPSTG_DEBUG) { error_log('WP STAGING: ' . $e->getMessage()); } } }); register_deactivation_hook($pluginFilePath, function () use ($pluginFilePath) { if (!class_exists('WPStaging\Deactivate')) { require_once __DIR__ . '/Deactivate.php'; } new WPStaging\Deactivate($pluginFilePath); });