' . esc_html__('2Download Connector for 2DL Hosted Checkout requires PHP 8.1 or newer.', '2download-connector') . '
'; }); return; } define('ToDownload_VERSION', '0.1.8'); define('ToDownload_PLUGIN_FILE', __FILE__); define('ToDownload_PLUGIN_DIR', plugin_dir_path(__FILE__)); define('ToDownload_PLUGIN_URL', plugin_dir_url(__FILE__)); spl_autoload_register(function (string $class): void { $prefix = 'ToDownload\\'; if (strpos($class, $prefix) !== 0) { return; } $relative = substr($class, strlen($prefix)); $path = ToDownload_PLUGIN_DIR . 'src/' . str_replace('\\', '/', $relative) . '.php'; if (is_file($path)) { require_once $path; } }); try { \ToDownload\Plugin::instance(); } catch (\Throwable $e) { add_action('admin_notices', function () use ($e): void { echo '' . esc_html__('2Download Connector for 2DL Hosted Checkout failed to load. Check your PHP error log for details.', '2download-connector') . '
' . esc_html($e->getMessage()) . ''; } }); }