You've already forked wc-tier-and-package-prices
Release version 1.1.10 - Complete function redeclaration fix
Fixed critical function redeclaration error for wc_tpp_init() affecting version 1.1.9. This completes the fix started in v1.1.9 by protecting all global functions from redeclaration during plugin lifecycle events. Fixes: - Function redeclaration error for wc_tpp_init() - Fatal error "Cannot redeclare function wc_tpp_init()" when plugin file loaded multiple times - Plugin activation failures Technical Changes: - Wrapped wc_tpp_init() function in function_exists() check - Both wc_tpp_woocommerce_missing_notice() and wc_tpp_init() now safely guarded - Prevents fatal errors during WordPress plugin activation/deactivation cycles - Comprehensive protection for all global function declarations Updated Files: - wc-tier-and-package-prices.php (version 1.1.10, wc_tpp_init safety check) - composer.json (version 1.1.10) - CHANGELOG.md (v1.1.10 section) - All translation files compiled (.mo files) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -21,6 +21,7 @@ npm-debug.log
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
/logs
|
||||
|
||||
# Notes
|
||||
notes.*
|
||||
|
||||
15
CHANGELOG.md
15
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.10] - 2025-12-22
|
||||
|
||||
### Fixed
|
||||
|
||||
- **CRITICAL:** Function redeclaration error for `wc_tpp_init()` affecting version 1.1.9
|
||||
- Fatal error "Cannot redeclare function wc_tpp_init()" when plugin file loaded multiple times
|
||||
- Plugin activation failures caused by function redeclaration
|
||||
|
||||
### Technical Details
|
||||
|
||||
- Wrapped `wc_tpp_init()` function in `function_exists()` check
|
||||
- Completes the fix started in v1.1.9 by protecting all global functions
|
||||
- Prevents fatal errors during WordPress plugin activation cycles
|
||||
- Both `wc_tpp_woocommerce_missing_notice()` and `wc_tpp_init()` now safely guarded
|
||||
|
||||
## [1.1.9] - 2025-12-22
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -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.9",
|
||||
"version": "1.1.10",
|
||||
"type": "wordpress-plugin",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"authors": [
|
||||
|
||||
BIN
releases/wc-tier-and-package-prices-1.1.10.zip
Normal file
BIN
releases/wc-tier-and-package-prices-1.1.10.zip
Normal file
Binary file not shown.
1
releases/wc-tier-and-package-prices-1.1.10.zip.md5
Normal file
1
releases/wc-tier-and-package-prices-1.1.10.zip.md5
Normal file
@@ -0,0 +1 @@
|
||||
81be5283219cfa722f6d382a788e7dc1 releases/wc-tier-and-package-prices-1.1.10.zip
|
||||
1
releases/wc-tier-and-package-prices-1.1.10.zip.sha256
Normal file
1
releases/wc-tier-and-package-prices-1.1.10.zip.sha256
Normal file
@@ -0,0 +1 @@
|
||||
2d3b01e61c8a03a8f20bc99b2019ca50fa08ecd68188feb2d2105dfe35d36f0d releases/wc-tier-and-package-prices-1.1.10.zip
|
||||
@@ -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.9
|
||||
* Version: 1.1.10
|
||||
* 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.9');
|
||||
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__));
|
||||
@@ -119,8 +119,10 @@ class WC_Tier_Package_Prices {
|
||||
}
|
||||
|
||||
// Initialize the plugin
|
||||
function wc_tpp_init() {
|
||||
return WC_Tier_Package_Prices::get_instance();
|
||||
if (!function_exists('wc_tpp_init')) {
|
||||
function wc_tpp_init() {
|
||||
return WC_Tier_Package_Prices::get_instance();
|
||||
}
|
||||
}
|
||||
|
||||
add_action('plugins_loaded', 'wc_tpp_init', 11);
|
||||
|
||||
Reference in New Issue
Block a user