'Version']); if (!empty($plugin_data['Version'])) { $plugin_version = (string) $plugin_data['Version']; } } define('WEINCC_VERSION', $plugin_version); } /** * Getter-Funktionen zur Vermeidung unnötiger DB-Abfragen im globalen Scope. */ function weincc_get_merchant_id(): string { return trim((string) get_option('weincc_merchant_id', '')); } function weincc_get_secret(): string { return trim((string) get_option('weincc_secret', '')); } function weincc_is_configured(): bool { return weincc_get_merchant_id() !== '' && weincc_get_secret() !== ''; } // Konfigurations-Konstanten (Snapshot zum Request-Start) define('WEINCC_MERCHANT_ID', weincc_get_merchant_id()); define('WEINCC_SECRET', weincc_get_secret()); define('WEINCC_IS_CONFIGURED', weincc_is_configured()); // Central Endpoint define('WEINCC_ENDPOINT', 'https://www.wein.cc/woocommerce_webhook.php'); // Alias (Produkt-Webhooks) define('WEINCC_PRODUCT_ENDPOINT', WEINCC_ENDPOINT); // Timeouts define('WEINCC_HTTP_TIMEOUT', 5);