diff --git a/CHANGELOG.md b/CHANGELOG.md index 43a7ce1..a6864ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,19 @@ 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.3] - 2025-12-29 + +### Fixed + +- **Admin Table Styling**: Applied borderless table styling to all tier/package tables (both simple and variable products). Previously only variation tables had borders removed in v1.2.2. Now all pricing tables in the admin have a consistent borderless appearance matching WooCommerce's clean admin UI style. + +- **Checkbox Styling and Tooltip**: Fixed checkbox styling issues where the help text was displayed inline instead of as a tooltip, and the margin between checkbox and label was too small. Added `desc_tip => true` to the variation restriction checkbox to enable tooltip display. Added CSS rules to increase checkbox-label margin to 8px and hide inline description text when tooltips are used. + +### Changed Files + +- `assets/css/admin.css` - Applied `border: none` to all tier/package table elements; added checkbox margin and description hiding rules +- `includes/class-wc-tpp-product-meta.php` - Added `desc_tip => true` parameter to variation checkbox (line 213) + ## [1.2.2] - 2025-12-29 ### Fixed diff --git a/CLAUDE.md b/CLAUDE.md index 528f2fb..d639acd 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,7 +1,7 @@ # WooCommerce Tier and Package Prices - AI Context Document **Last Updated:** 2025-12-29 -**Current Version:** 1.2.2 +**Current Version:** 1.2.3 **Author:** Marco Graetsch **Project Status:** Production-ready WordPress plugin @@ -566,11 +566,17 @@ Roadmap for the upcoming development. ##### Bugfixes (Completed in v1.2.2) -3. ~~Remove the table borders in admin on variable product to better fit the surrounding element styles.~~ ✅ **FIXED in v1.2.2** - Added CSS rules to remove table borders specifically for variation pricing tables (`.wc-tpp-variation-pricing`), matching WooCommerce's borderless variation UI style. +1. ~~Remove the table borders in admin on variable product to better fit the surrounding element styles.~~ ✅ **FIXED in v1.2.2** - Added CSS rules to remove table borders specifically for variation pricing tables (`.wc-tpp-variation-pricing`), matching WooCommerce's borderless variation UI style. -4. ~~Add missing translations in admin templates ("Price", "Tier & Package Pricing", "Min Quantity") for all languages used in this project.~~ ✅ **FIXED in v1.2.2** - Added missing translation entries for "Min Quantity", "Price", and "Label (optional)" to all .po files (de_DE, de_DE_informal, de_CH, de_CH_informal, fr_CH, it_CH, en_US) and recompiled .mo files. +2. ~~Add missing translations in admin templates ("Price", "Tier & Package Pricing", "Min Quantity") for all languages used in this project.~~ ✅ **FIXED in v1.2.2** - Added missing translation entries for "Min Quantity", "Price", and "Label (optional)" to all .po files (de_DE, de_DE_informal, de_CH, de_CH_informal, fr_CH, it_CH, en_US) and recompiled .mo files. -5. ~~Check the template for wc_tpp_restrict_to_packages[] checkbox elements in admin on variable products and fix the rendering.~~ ✅ **FIXED in v1.2.2** - Fixed checkbox value parameter in variation pricing fields. Changed from ternary expression to direct value assignment, allowing WooCommerce's `woocommerce_wp_checkbox()` to properly handle the checked state. +3. ~~Check the template for wc_tpp_restrict_to_packages[] checkbox elements in admin on variable products and fix the rendering.~~ ✅ **FIXED in v1.2.2** - Fixed checkbox value parameter in variation pricing fields. Changed from ternary expression to direct value assignment, allowing WooCommerce's `woocommerce_wp_checkbox()` to properly handle the checked state. + +##### Bugfixes (Completed in v1.2.3) + +1. ~~Style the tier and packages tables in admin on simple products according to the styles on variable products.~~ ✅ **FIXED in v1.2.3** - Applied borderless table styling to all tier/package tables (both simple and variable products). Removed borders from table, th, and td elements to match WooCommerce's clean admin UI style. + +2. ~~The checkbox styles from 1.2.2 bug 3 are still not looking correct. The helptext is written instead of hidden after the help icon and the margin between checkbox and label are to small.~~ ✅ **FIXED in v1.2.3** - Added `desc_tip => true` to variation checkbox to show tooltip instead of inline text. Added CSS rules to increase checkbox-label margin (8px) and hide inline description text when tooltip is used. ##### New Features diff --git a/assets/css/admin.css b/assets/css/admin.css index edab391..bb6eb0d 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -23,29 +23,23 @@ color: #666; } -/* Table styling */ +/* Table styling - borderless design for all tier/package tables */ .wc-tpp-tiers-table, .wc-tpp-packages-table { margin-top: 15px; margin-bottom: 15px; + border: none; } .wc-tpp-tiers-table th, .wc-tpp-packages-table th { font-weight: 600; text-align: left; -} - -/* Remove borders for variation pricing tables to match WooCommerce variation UI style */ -.wc-tpp-variation-pricing .wc-tpp-tiers-table, -.wc-tpp-variation-pricing .wc-tpp-packages-table { border: none; } -.wc-tpp-variation-pricing .wc-tpp-tiers-table th, -.wc-tpp-variation-pricing .wc-tpp-packages-table th, -.wc-tpp-variation-pricing .wc-tpp-tiers-table td, -.wc-tpp-variation-pricing .wc-tpp-packages-table td { +.wc-tpp-tiers-table td, +.wc-tpp-packages-table td { border: none; } @@ -101,3 +95,22 @@ color: #666; font-style: italic; } + +/* Checkbox styling improvements */ +#_wc_tpp_restrict_to_packages, +input[id^="wc_tpp_restrict_to_packages_"] { + margin-right: 8px !important; +} + +/* Ensure description is properly hidden when desc_tip is used */ +.wc-tpp-tier-pricing .woocommerce-help-tip, +.wc-tpp-package-pricing .woocommerce-help-tip, +.wc-tpp-variation-pricing .woocommerce-help-tip { + margin-left: 5px; +} + +/* Hide inline description text when tooltip is shown */ +#_wc_tpp_restrict_to_packages + .description, +input[id^="wc_tpp_restrict_to_packages_"] + .description { + display: none; +} diff --git a/composer.json b/composer.json index b4fe4a4..07cf6c1 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "magdev/wc-tier-package-prices", "description": "WooCommerce plugin for tier pricing and package prices with Twig templates", - "version": "1.2.2", + "version": "1.2.3", "type": "wordpress-plugin", "license": "GPL-2.0-or-later", "authors": [ diff --git a/includes/class-wc-tpp-product-meta.php b/includes/class-wc-tpp-product-meta.php index 52cc2fa..4cfd7b7 100644 --- a/includes/class-wc-tpp-product-meta.php +++ b/includes/class-wc-tpp-product-meta.php @@ -210,6 +210,7 @@ if (!class_exists('WC_TPP_Product_Meta')) { 'name' => 'wc_tpp_restrict_to_packages[' . $loop . ']', 'label' => __('Restrict to Package Quantities', 'wc-tier-package-prices'), 'description' => __('Only allow quantities defined in packages above', 'wc-tier-package-prices'), + 'desc_tip' => true, 'value' => $restrict, 'cbvalue' => 'yes', 'wrapper_class' => 'form-row form-row-full' diff --git a/wc-tier-and-package-prices.php b/wc-tier-and-package-prices.php index 07e0c7f..c6a3a16 100644 --- a/wc-tier-and-package-prices.php +++ b/wc-tier-and-package-prices.php @@ -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.2.2 + * Version: 1.2.3 * 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.2.2'); + define('WC_TPP_VERSION', '1.2.3'); } if (!defined('WC_TPP_PLUGIN_DIR')) { define('WC_TPP_PLUGIN_DIR', plugin_dir_path(__FILE__));