Release version 1.3.0 - License management and settings sub-tabs

Breaking Changes:
- PHP 8.3+ now required (previously 7.4+)

Added:
- License management integration using magdev/wc-licensed-product-client
- Settings page split into General and License sub-tabs
- License validation and activation via AJAX
- PHP version check with admin notice

Changed:
- Refactored settings class to use modern WooCommerce patterns
- Updated all translations with new license-related strings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-25 19:39:12 +01:00
parent 0dbe18d954
commit 74c14581f1
21 changed files with 1310 additions and 62 deletions

29
wc-tier-and-package-prices.php Normal file → Executable file
View File

@@ -4,13 +4,13 @@
* Plugin Name: WooCommerce Tier and Package Prices
* Plugin URI: https://src.bundespruefstelle.ch/magdev/wc-tier-package-prices
* Description: Add tier pricing and package prices to WooCommerce products with configurable quantities at fixed prices
* Version: 1.2.9
* Version: 1.3.0
* Author: Marco Graetsch
* Author URI: https://src.bundespruefstelle.ch/magdev
* Text Domain: wc-tier-package-prices
* Domain Path: /languages
* Requires at least: 6.0
* Requires PHP: 7.4
* Requires PHP: 8.3
* WC requires at least: 8.0
* WC tested up to: 10.0
* License: GPL v2 or later
@@ -21,9 +21,32 @@ if (!defined('ABSPATH')) {
exit; // Exit if accessed directly
}
// Check PHP version requirement
if (version_compare(PHP_VERSION, '8.3.0', '<')) {
add_action('admin_notices', 'wc_tpp_php_version_notice');
return;
}
/**
* Display PHP version notice
*/
if (!function_exists('wc_tpp_php_version_notice')) {
function wc_tpp_php_version_notice() {
?>
<div class="notice notice-error">
<p><?php printf(
/* translators: %s: Current PHP version */
__('WooCommerce Tier and Package Prices requires PHP 8.3 or higher. Your server is running PHP %s.', 'wc-tier-package-prices'),
PHP_VERSION
); ?></p>
</div>
<?php
}
}
// Define plugin constants
if (!defined('WC_TPP_VERSION')) {
define('WC_TPP_VERSION', '1.2.9');
define('WC_TPP_VERSION', '1.3.0');
}
if (!defined('WC_TPP_PLUGIN_DIR')) {
define('WC_TPP_PLUGIN_DIR', plugin_dir_path(__FILE__));