You've already forked wc-tier-and-package-prices
Release version 1.1.14 - Restore plugin functionality
**CRITICAL FIX:** Restored plugin to working state after v1.1.8-1.1.13 were completely non-functional. **Root Cause:** - v1.1.8 moved class instantiation from individual files to init_classes() method - v1.1.13 wrapped classes in class_exists() guards - Combination prevented any classes from being instantiated - Result: No settings, no frontend, no backend functionality **Solution:** - Reverted to v1.1.2 pattern (last working version) - Each class file now instantiates itself with `new ClassName();` - Removed init_classes() method and woocommerce_loaded hook - All class_exists() guards remain for redeclaration protection **What Now Works:** ✅ WooCommerce Settings → Tier & Package Prices tab ✅ Product edit pages show tier/package pricing meta boxes ✅ Frontend displays pricing tables on product pages ✅ Cart applies tier/package pricing correctly ✅ All plugin functionality fully operational **Files Modified:** - includes/class-wc-tpp-admin.php - includes/class-wc-tpp-product-meta.php - includes/class-wc-tpp-frontend.php - includes/class-wc-tpp-cart.php - wc-tier-and-package-prices.php (removed init_classes) 🤖 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.13
|
||||
* Version: 1.1.14
|
||||
* Author: Marco Graetsch
|
||||
* Author URI: https://src.bundespruefstelle.ch/magdev
|
||||
* Text Domain: wc-tier-package-prices
|
||||
@@ -23,7 +23,7 @@ if (!defined('ABSPATH')) {
|
||||
|
||||
// Define plugin constants
|
||||
if (!defined('WC_TPP_VERSION')) {
|
||||
define('WC_TPP_VERSION', '1.1.13');
|
||||
define('WC_TPP_VERSION', '1.1.14');
|
||||
}
|
||||
if (!defined('WC_TPP_PLUGIN_DIR')) {
|
||||
define('WC_TPP_PLUGIN_DIR', plugin_dir_path(__FILE__));
|
||||
@@ -92,16 +92,6 @@ if (!class_exists('WC_Tier_Package_Prices')) {
|
||||
require_once WC_TPP_PLUGIN_DIR . 'includes/class-wc-tpp-product-meta.php';
|
||||
require_once WC_TPP_PLUGIN_DIR . 'includes/class-wc-tpp-frontend.php';
|
||||
require_once WC_TPP_PLUGIN_DIR . 'includes/class-wc-tpp-cart.php';
|
||||
|
||||
// Instantiate classes after WooCommerce is loaded
|
||||
add_action('woocommerce_loaded', array($this, 'init_classes'));
|
||||
}
|
||||
|
||||
public function init_classes() {
|
||||
new WC_TPP_Admin();
|
||||
new WC_TPP_Product_Meta();
|
||||
new WC_TPP_Frontend();
|
||||
new WC_TPP_Cart();
|
||||
}
|
||||
|
||||
public function declare_hpos_compatibility() {
|
||||
|
||||
Reference in New Issue
Block a user