From fa7ec0e42295e9e83eb36654d81964f60c18686c Mon Sep 17 00:00:00 2001 From: magdev Date: Wed, 31 Dec 2025 22:34:46 +0100 Subject: [PATCH] Fix two critical bugs in v1.1.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug 1: Admin - Both General and Composable tabs visible on initial load - Added explicit display:none to #composable_product_data panel - Panel now hidden by default, shows only when product-type-composable class is present - Prevents both tabs showing simultaneously on new product creation Bug 2: Frontend - No feedback when no products configured - Added empty state message when products array is empty - Users now see helpful message instead of blank grid - Cleared Twig cache to ensure template changes take effect 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- assets/css/admin.css | 7 +++++++ templates/product-selector.twig | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/assets/css/admin.css b/assets/css/admin.css index 42e7ff1..e4a7373 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -4,10 +4,17 @@ * @package WC_Composable_Product */ +/* Hide composable panel by default */ #composable_product_data { + display: none; padding: 12px; } +/* Show composable panel when composable type is selected */ +body.product-type-composable #composable_product_data { + display: block; +} + .composable_criteria_group { border-top: 1px solid #eee; padding-top: 12px; diff --git a/templates/product-selector.twig b/templates/product-selector.twig index 75c4a54..20b755c 100644 --- a/templates/product-selector.twig +++ b/templates/product-selector.twig @@ -9,6 +9,11 @@
+ {% if products is empty %} +
+

{{ __('No products available for selection. Please configure the product criteria in the admin panel.') }}

+
+ {% else %} {% for product in products %}
@@ -52,6 +57,7 @@
{% endfor %} + {% endif %}
{% if show_total %}