diff --git a/CHANGELOG.md b/CHANGELOG.md index 6205473..09d0a0c 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.9] - 2025-12-22 + +### Fixed + +- **CRITICAL:** Function redeclaration error for `wc_tpp_woocommerce_missing_notice()` affecting versions 1.1.3-1.1.8 +- Fatal error "Cannot redeclare function wc_tpp_woocommerce_missing_notice()" when plugin file loaded multiple times +- Plugin activation and deactivation failures caused by function redeclaration + +### Technical Details + +- Wrapped `wc_tpp_woocommerce_missing_notice()` function in `function_exists()` check +- Prevents fatal error during WordPress plugin activation/deactivation cycles +- Ensures function can safely be declared even if file is included multiple times +- Moved function declaration before WooCommerce check for better code organization + ## [1.1.8] - 2025-12-22 ### Fixed diff --git a/composer.json b/composer.json index 68eab5b..1c93b8e 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.8", + "version": "1.1.9", "type": "wordpress-plugin", "license": "GPL-2.0-or-later", "authors": [ diff --git a/releases/wc-tier-and-package-prices-1.1.8.zip b/releases/wc-tier-and-package-prices-1.1.8.zip new file mode 100644 index 0000000..3d8023a Binary files /dev/null and b/releases/wc-tier-and-package-prices-1.1.8.zip differ diff --git a/releases/wc-tier-and-package-prices-1.1.8.zip.md5 b/releases/wc-tier-and-package-prices-1.1.8.zip.md5 new file mode 100644 index 0000000..a48f098 --- /dev/null +++ b/releases/wc-tier-and-package-prices-1.1.8.zip.md5 @@ -0,0 +1 @@ +666e1acad9f349982463b65d0e3e7fa3 wc-tier-and-package-prices-1.1.8.zip diff --git a/releases/wc-tier-and-package-prices-1.1.8.zip.sha256 b/releases/wc-tier-and-package-prices-1.1.8.zip.sha256 new file mode 100644 index 0000000..fefe69f --- /dev/null +++ b/releases/wc-tier-and-package-prices-1.1.8.zip.sha256 @@ -0,0 +1 @@ +2c100d0d100a6fd7bd8f9c9b154d878a675bc795c5fddb19314bc9991b9a60ba wc-tier-and-package-prices-1.1.8.zip diff --git a/releases/wc-tier-and-package-prices-1.1.9.zip b/releases/wc-tier-and-package-prices-1.1.9.zip new file mode 100644 index 0000000..9cd3e85 Binary files /dev/null and b/releases/wc-tier-and-package-prices-1.1.9.zip differ diff --git a/releases/wc-tier-and-package-prices-1.1.9.zip.md5 b/releases/wc-tier-and-package-prices-1.1.9.zip.md5 new file mode 100644 index 0000000..d90747e --- /dev/null +++ b/releases/wc-tier-and-package-prices-1.1.9.zip.md5 @@ -0,0 +1 @@ +7421aceb8d1cc89b7d15b19d68cdfabe wc-tier-and-package-prices-1.1.9.zip diff --git a/releases/wc-tier-and-package-prices-1.1.9.zip.sha256 b/releases/wc-tier-and-package-prices-1.1.9.zip.sha256 new file mode 100644 index 0000000..a3a972e --- /dev/null +++ b/releases/wc-tier-and-package-prices-1.1.9.zip.sha256 @@ -0,0 +1 @@ +8224bf8b9bfc3dc760d77c61700d27c31db1a67b70834d8b6a4581df66fd45bd wc-tier-and-package-prices-1.1.9.zip diff --git a/wc-tier-and-package-prices.php b/wc-tier-and-package-prices.php index a1824e4..fae1dd9 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.8 + * Version: 1.1.9 * Author: Marco Graetsch * Author URI: https://src.bundespruefstelle.ch/magdev * Text Domain: wc-tier-package-prices @@ -22,7 +22,7 @@ if (!defined('ABSPATH')) { } // Define plugin constants -define('WC_TPP_VERSION', '1.1.8'); +define('WC_TPP_VERSION', '1.1.9'); 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__)); @@ -30,6 +30,19 @@ define('WC_TPP_PLUGIN_BASENAME', plugin_basename(__FILE__)); // Load Composer autoloader require_once WC_TPP_PLUGIN_DIR . 'vendor/autoload.php'; +/** + * Display WooCommerce missing notice + */ +if (!function_exists('wc_tpp_woocommerce_missing_notice')) { + function wc_tpp_woocommerce_missing_notice() { + ?> +
+

+
+ -
-

-
-