diff --git a/CHANGELOG.md b/CHANGELOG.md index d4a1224..a1823ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,21 @@ 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.1.11] - 2025-12-22 + +### Fixed + +- **CRITICAL:** Constant redeclaration warnings/errors for plugin constants affecting versions 1.1.3-1.1.10 +- Potential errors when plugin constants (WC_TPP_VERSION, WC_TPP_PLUGIN_DIR, etc.) already defined +- Plugin initialization failures caused by constant redeclaration + +### Technical Details + +- Wrapped all `define()` calls in `defined()` checks for WC_TPP_VERSION, WC_TPP_PLUGIN_DIR, WC_TPP_PLUGIN_URL, WC_TPP_PLUGIN_BASENAME +- Prevents warnings/errors during WordPress plugin activation/deactivation cycles +- Completes comprehensive protection against all redeclaration issues +- All global functions and constants now safely guarded + ## [1.1.10] - 2025-12-22 ### Fixed diff --git a/composer.json b/composer.json index a2df238..3207f3a 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "magdev/wc-tier-package-prices", "description": "WooCommerce plugin for tier pricing and package prices with Twig templates", - "version": "1.1.10", + "version": "1.1.11", "type": "wordpress-plugin", "license": "GPL-2.0-or-later", "authors": [ diff --git a/releases/wc-tier-and-package-prices-1.1.11.zip b/releases/wc-tier-and-package-prices-1.1.11.zip new file mode 100644 index 0000000..ca7a36e Binary files /dev/null and b/releases/wc-tier-and-package-prices-1.1.11.zip differ diff --git a/releases/wc-tier-and-package-prices-1.1.11.zip.md5 b/releases/wc-tier-and-package-prices-1.1.11.zip.md5 new file mode 100644 index 0000000..9625020 --- /dev/null +++ b/releases/wc-tier-and-package-prices-1.1.11.zip.md5 @@ -0,0 +1 @@ +4a0c0b07b29d4b7046f9d3ff3f091321 releases/wc-tier-and-package-prices-1.1.11.zip diff --git a/releases/wc-tier-and-package-prices-1.1.11.zip.sha256 b/releases/wc-tier-and-package-prices-1.1.11.zip.sha256 new file mode 100644 index 0000000..8a17c2c --- /dev/null +++ b/releases/wc-tier-and-package-prices-1.1.11.zip.sha256 @@ -0,0 +1 @@ +3da9423d136a2ff254b61577ba1f84d4c0f0d1e57bae361ac29c90327feeeceb releases/wc-tier-and-package-prices-1.1.11.zip diff --git a/wc-tier-and-package-prices.php b/wc-tier-and-package-prices.php index 299eb6b..121cc1e 100644 --- a/wc-tier-and-package-prices.php +++ b/wc-tier-and-package-prices.php @@ -4,7 +4,7 @@ * 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.1.10 + * Version: 1.1.11 * Author: Marco Graetsch * Author URI: https://src.bundespruefstelle.ch/magdev * Text Domain: wc-tier-package-prices @@ -22,10 +22,18 @@ if (!defined('ABSPATH')) { } // Define plugin constants -define('WC_TPP_VERSION', '1.1.10'); -define('WC_TPP_PLUGIN_DIR', plugin_dir_path(__FILE__)); -define('WC_TPP_PLUGIN_URL', plugin_dir_url(__FILE__)); -define('WC_TPP_PLUGIN_BASENAME', plugin_basename(__FILE__)); +if (!defined('WC_TPP_VERSION')) { + define('WC_TPP_VERSION', '1.1.11'); +} +if (!defined('WC_TPP_PLUGIN_DIR')) { + define('WC_TPP_PLUGIN_DIR', plugin_dir_path(__FILE__)); +} +if (!defined('WC_TPP_PLUGIN_URL')) { + define('WC_TPP_PLUGIN_URL', plugin_dir_url(__FILE__)); +} +if (!defined('WC_TPP_PLUGIN_BASENAME')) { + define('WC_TPP_PLUGIN_BASENAME', plugin_basename(__FILE__)); +} // Load Composer autoloader require_once WC_TPP_PLUGIN_DIR . 'vendor/autoload.php';