You've already forked wc-tier-and-package-prices
Release version 1.2.6 - Critical bugfixes for v1.2.5 features
Fixed two critical issues that prevented v1.2.5 features from working: 1. Parent Product Pricing Forms Not Visible (Critical) - Variable products were missing admin UI for parent pricing configuration - v1.2.5 implemented backend logic but forgot the admin forms - Added add_variable_parent_pricing_fields() method - Modified existing methods to skip variable products (simple only) - Parent pricing now fully functional with matching UI 2. Table Headers Not Hiding When Empty - CSS sibling selector ~ doesn't work when thead comes before tbody - Removed incorrect selector, kept only :has() pseudo-class - Added !important flag for proper specificity - Modern browser support (Chrome 105+, Firefox 121+, Safari 15.4+) Changed files: - includes/class-wc-tpp-product-meta.php - Added parent pricing forms - assets/css/admin.css - Fixed header hiding CSS - wc-tier-and-package-prices.php - Version 1.2.6 - composer.json - Version 1.2.6 - CHANGELOG.md - Detailed release notes 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
33
CHANGELOG.md
33
CHANGELOG.md
@@ -5,6 +5,39 @@ 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.2.6] - 2025-12-30
|
||||
|
||||
### Fixed
|
||||
|
||||
- **Parent Product Pricing Forms Not Visible (Critical)**: Variable products were missing the pricing configuration forms on the parent product edit page. The v1.2.5 feature for parent product default pricing was implemented in the backend logic (cart calculations and frontend display) but the admin UI to configure these defaults was not added. Now variable product parents have a dedicated "Default Tier & Package Pricing for All Variations" section in the product edit page where administrators can configure default pricing that applies to all variations unless a specific variation overrides it.
|
||||
|
||||
- **Table Headers Not Hiding When Empty**: The CSS selector for hiding table headers when no pricing rules exist was using an incorrect approach. The sibling selector `~` doesn't work when `<thead>` comes before `<tbody>` in the HTML structure. Removed the sibling selector and kept only the `:has()` pseudo-class approach with `!important` flag for proper specificity.
|
||||
|
||||
### Technical Details
|
||||
|
||||
**Parent Product Forms Fix**:
|
||||
- Added new method `add_variable_parent_pricing_fields()` in `WC_TPP_Product_Meta` class
|
||||
- Hooked to `woocommerce_product_options_pricing` action but only displays for variable products
|
||||
- Modified existing `add_tier_pricing_fields()` and `add_package_pricing_fields()` to skip variable products (they now only show for simple products)
|
||||
- Parent product forms use same field names as simple products (`_wc_tpp_tiers`, `_wc_tpp_packages`, `_wc_tpp_restrict_to_packages`)
|
||||
- Data is saved to parent product post meta using existing `save_tier_package_fields()` method
|
||||
- Backend fallback logic from v1.2.5 now has matching admin UI for configuration
|
||||
|
||||
**CSS Selector Fix**:
|
||||
- Removed incorrect `.wc-tpp-tiers-container:empty ~ thead` selector (sibling selector can't target previous elements)
|
||||
- Kept only `.wc-tpp-tiers-table:has(tbody.wc-tpp-tiers-container:empty) thead` with `!important` flag
|
||||
- `:has()` pseudo-class is supported in modern browsers (Chrome 105+, Firefox 121+, Safari 15.4+)
|
||||
|
||||
**User Impact**:
|
||||
- Administrators can now configure default tier/package pricing on variable product parents (feature was non-functional in v1.2.5)
|
||||
- Table headers properly hide when no pricing rules exist, creating cleaner admin interface
|
||||
- No data migration needed - existing configurations remain intact
|
||||
|
||||
### Changed Files
|
||||
|
||||
- `includes/class-wc-tpp-product-meta.php` - Added `add_variable_parent_pricing_fields()` method; modified `add_tier_pricing_fields()` and `add_package_pricing_fields()` to skip variable products
|
||||
- `assets/css/admin.css` - Fixed table header hiding CSS selector; removed incorrect sibling selector; added `!important` flag
|
||||
|
||||
## [1.2.5] - 2025-12-30
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user