You've already forked wc-tier-and-package-prices
Version 1.4.1 - Localhost license bypass and auto-updates
All checks were successful
Create Release Package / build-release (push) Successful in 1m3s
All checks were successful
Create Release Package / build-release (push) Successful in 1m3s
Added localhost/self-licensing license bypass and WordPress auto-update integration from license server. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
57
CHANGELOG.md
57
CHANGELOG.md
@@ -5,6 +5,63 @@ All notable changes to WooCommerce Tier and Package Prices will be documented in
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.4.1] - 2026-02-03
|
||||
|
||||
### Added
|
||||
|
||||
- **Localhost License Bypass**: License validation is automatically bypassed for localhost environments
|
||||
- Supports localhost, 127.0.0.1, ::1 (IPv6), `*.localhost`, `*.local`, `*.test`, `*.example`, `*.invalid`
|
||||
- Private IP ranges (Docker, VMs) are also recognized as localhost
|
||||
- Displays "(Localhost environment - license validation bypassed)" in License Status
|
||||
|
||||
- **Self-Licensing Bypass**: License validation is bypassed when the site URL matches the license server URL
|
||||
- Useful for testing the plugin on the license server itself
|
||||
- Displays "(Self-licensing server - license validation bypassed)" in License Status
|
||||
|
||||
- **Auto-Update System**: Plugin can now receive updates directly from the license server
|
||||
- New "Auto-Updates" settings tab under WooCommerce > Tier & Package Prices
|
||||
- **Enable Update Notifications**: Toggle to check for available updates (default: enabled)
|
||||
- **Automatically Install Updates**: Optional auto-install when WordPress performs background updates
|
||||
- **Check Frequency**: Configurable hours between update checks (1-168 hours, default: 12)
|
||||
- **Update Status**: Shows current version and available update with "Check for Updates" button
|
||||
- Updates appear in WordPress Dashboard > Updates with full plugin info
|
||||
|
||||
- **New Classes**:
|
||||
- `WC_TPP_License_Checker`: Singleton class handling license validation with localhost/self-licensing bypass
|
||||
- `WC_TPP_Update_Checker`: Singleton class integrating with WordPress plugin update system
|
||||
|
||||
### Technical Details
|
||||
|
||||
**License Checker Features**:
|
||||
|
||||
- `is_localhost()`: Detects localhost environments using multiple patterns
|
||||
- `is_self_licensing()`: Compares license server URL with site URL
|
||||
- `is_license_valid()`: Main entry point with bypass logic
|
||||
- `get_bypass_reason()`: Returns 'localhost', 'self_licensing', or null
|
||||
- Cached validation (1 hour success, 5 minutes error)
|
||||
|
||||
**Update Checker Features**:
|
||||
|
||||
- Hooks into `pre_set_site_transient_update_plugins` for update detection
|
||||
- Hooks into `plugins_api` for update modal information
|
||||
- Hooks into `http_request_args` for license authentication
|
||||
- Hooks into `auto_update_plugin` for background updates
|
||||
- Can be disabled via `WC_TPP_DISABLE_AUTO_UPDATE` constant
|
||||
|
||||
**New Settings Options**:
|
||||
|
||||
- `wc_tpp_update_notification_enabled` (yes/no, default: yes)
|
||||
- `wc_tpp_auto_install_enabled` (yes/no, default: no)
|
||||
- `wc_tpp_update_check_frequency` (number, default: 12)
|
||||
|
||||
**Update Server Endpoint**:
|
||||
|
||||
- POST to `/wp-json/wc-licensed-product/v1/update-check`
|
||||
- Request body: `{license_key, domain, plugin_slug, current_version}`
|
||||
- Response: `{success, update_available, version, download_url, ...}`
|
||||
|
||||
---
|
||||
|
||||
## [1.4.0] - 2026-01-29
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user