diff --git a/CHANGELOG.md b/CHANGELOG.md index 83f4791..e061121 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.4.0] - 2026-01-24 + +### Added + +- Self-licensing prevention: Plugin automatically bypasses license validation when the configured license server URL points to the same WordPress installation +- New `isSelfLicensing()` method in `PluginLicenseChecker` to detect circular licensing scenarios +- New `normalizeDomain()` helper method for domain comparison (strips www prefix, lowercases) + +### Changed + +- `isLicenseValid()` and `validateLicense()` now check for self-licensing before attempting validation +- Cache clearing now also clears the self-licensing check cache + +### Technical Details + +- Self-licensing detection compares normalized domains of license server URL and current site URL +- Prevents circular dependency where plugin would try to validate against itself +- Plugins can only be validated against the original store from which they were obtained + ## [0.3.9] - 2026-01-24 ### Added diff --git a/wc-licensed-product.php b/wc-licensed-product.php index 193a517..ac45a3c 100644 --- a/wc-licensed-product.php +++ b/wc-licensed-product.php @@ -3,7 +3,7 @@ * Plugin Name: WooCommerce Licensed Product * Plugin URI: https://src.bundespruefstelle.ch/magdev/wc-licensed-product * Description: WooCommerce plugin to sell software products using license keys with domain-based validation. - * Version: 0.3.9 + * Version: 0.4.0 * Author: Marco Graetsch * Author URI: https://src.bundespruefstelle.ch/magdev * License: GPL-2.0-or-later @@ -28,7 +28,7 @@ if (!defined('ABSPATH')) { } // Plugin constants -define('WC_LICENSED_PRODUCT_VERSION', '0.3.9'); +define('WC_LICENSED_PRODUCT_VERSION', '0.4.0'); define('WC_LICENSED_PRODUCT_PLUGIN_FILE', __FILE__); define('WC_LICENSED_PRODUCT_PLUGIN_DIR', plugin_dir_path(__FILE__)); define('WC_LICENSED_PRODUCT_PLUGIN_URL', plugin_dir_url(__FILE__));