You've already forked wc-tier-and-package-prices
Release version 1.1.8 - Critical activation fix
Fixed critical plugin activation error that was preventing the plugin from being activated on WordPress 6.9.x and WooCommerce 10.x. The issue was introduced in v1.1.3 when admin classes were still being instantiated immediately at file include time, before WooCommerce was loaded. While v1.1.6 fixed this for Frontend and Cart classes, the Admin and Product Meta classes were missed. Critical Fix: - Removed immediate instantiation from WC_TPP_Admin class - Removed immediate instantiation from WC_TPP_Product_Meta class - Both classes now instantiated via woocommerce_loaded hook - Ensures all WooCommerce hooks are available before registration Technical Changes: - Removed "new WC_TPP_Admin();" from class-wc-tpp-admin.php - Removed "new WC_TPP_Product_Meta();" from class-wc-tpp-product-meta.php - Added both classes to init_classes() method in main plugin file - All four main classes now follow consistent initialization pattern Impact: - Plugin now activates correctly on all WordPress/WooCommerce versions - Resolves fatal errors during plugin activation - Last working version was v1.1.2, now fixed in v1.1.8 Updated Files: - includes/class-wc-tpp-admin.php (removed auto-instantiation) - includes/class-wc-tpp-product-meta.php (removed auto-instantiation) - wc-tier-and-package-prices.php (version 1.1.8, init_classes updated) - composer.json (version 1.1.8) - CHANGELOG.md (v1.1.8 section added) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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.7
|
||||
* Version: 1.1.8
|
||||
* 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.7');
|
||||
define('WC_TPP_VERSION', '1.1.8');
|
||||
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__));
|
||||
@@ -84,6 +84,8 @@ class WC_Tier_Package_Prices {
|
||||
}
|
||||
|
||||
public function init_classes() {
|
||||
new WC_TPP_Admin();
|
||||
new WC_TPP_Product_Meta();
|
||||
new WC_TPP_Frontend();
|
||||
new WC_TPP_Cart();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user