Release version 1.2.5 - Parent product default pricing and UI enhancements

Added:
- Parent product default pricing for variable products - set tier/package pricing once on parent, variations inherit unless overridden
- Hide empty table headers in admin until pricing rules are defined

Technical:
- Added parent fallback logic to get_tier_price() and get_package_price() methods
- Created helper methods get_packages_with_fallback() and is_restriction_enabled() in cart class
- Updated all cart methods to support parent product defaults
- Added CSS :has() selectors to hide table headers when tbody is empty
- Fixed cart pricing calls to pass correct product ID for fallback resolution

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-30 00:23:56 +01:00
parent e2e40538df
commit e4ecc2c0be
7 changed files with 120 additions and 51 deletions

View File

@@ -1,7 +1,7 @@
# WooCommerce Tier and Package Prices - AI Context Document
**Last Updated:** 2025-12-30
**Current Version:** 1.2.4
**Current Version:** 1.2.5
**Author:** Marco Graetsch
**Project Status:** Production-ready WordPress plugin
@@ -765,10 +765,6 @@ Roadmap for the upcoming development.
2. Make it possible to define tier or package prices on variable products in the parent product as a default for that product and all variants of it unless a variant has its own tier or package prices.
##### New Features
1. Create different, selectable templates for tierprices and packages to use in the frontend. Make the new templates selectable globally on the settings-page, not per product.
### When Debugging Cart Issues
1. Check `includes/class-wc-tpp-cart.php` first